Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

How to make "if conditions" in CDS work like Excel "if conditions" : Calculated fields

(1) ShareShare
ReportReport
Posted on by

I have been trying to achieve the following in a if condition in a calulated field , Could you please help me the achieve this kind of values which are dynamic.

 

By default the if condition only allows a "static value" or a "field value " , is there any way i can have a computed "field value" as follows , this is the formula based on excel , i need to achieve the same in CDS calculated fields

 

=IF( 
 BX$4 <= $AI5, 
 IF( 
 OR( 
 BX$4 = $AH5 + 1, 
 BX$4 = $AH5 * 2 + 1, 
 BX$4 = $AH5 * 3 + 1, 
 BX$4 = $AH5 * 4 + 1, 
 BX$4 = $AH5 * 5 + 1, 
 BX$4 = $AH5 * 6 + 1, 
 BX$4 = $AH5 * 7 + 1, 
 BX$4 = $AH5 * 8 + 1, 
 BX$4 = $AH5 * 9 + 1, 
 BX$4 = $AH5 * 10 + 1, 
 BX$4 = $AH5 * 11 + 1, 
 BX$4 = $AH5 * 12 + 1, 
 BX$4 = $AH5 * 13 + 1, 
 BX$4 = $AH5 * 14 + 1, 
 BX$4 = $AH5 * 15 + 1, 
 BX$4 = $AH5 * 16 + 1, 
 BX$4 = $AH5 * 17 + 1, 
 BX$4 = $AH5 * 18 + 1, 
 BX$4 = $AH5 * 19 + 1, 
 BX$4 = $AH5 * 20 + 1 
 ), 
 BW5 * ( 1 + $AE5 ), 
 BW5 
 ), 
 0 
) 
Categories:
  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: How to make "if conditions" in CDS work like Excel "if conditions" : Calculated fields

    Hi @Anonymous,

    Possible to get a little bit more info on the requirements instead of the formula? Reason I'm asking is maybe there's an easier way to achieve it using out-of-the-box features instead of coding like in the previous post.

    Thanks 

  • summitb Profile Picture
    on at
    Re: How to make "if conditions" in CDS work like Excel "if conditions" : Calculated fields

    Create a plugin that do these calculated when a record is created. So, that the expected field acts like calculated field. You can run flows as well but Plugins are more robust.

     

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/plugin-development

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics