cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcosP
Helper I
Helper I

Formula verification in Dataverse

Hi Guys,

 

So i'm trying to build a formula in dataverse in theory is simple:

 

If the result of the formula is greater than 1 return 1.

 

This is the formula: 

 

MarcosP_0-1653348757779.png

 

I created another field with the same formula trying to put the value = 1 but even with this happens to result > 1.

 

MarcosP_1-1653348933064.png

 

Even with this in app brings field greater than 1:

 

MarcosP_2-1653348986102.png

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Super User
Super User

Hi @MarcosP ,

 

Looking at this, it appears you have two calculated fields and you are trying to set one value based on the other.  There is no specific order of precedence here so I am assuming this is why it is not working as expected.

 

Is there a reason you don't do a single calculated field that will have the following type of code?

 

If A2_Analiser_v2 = Nao

  AND a39_auxCalculodiv is less than 1

         Set A39_PercentualProvisaoFinalAposRevisao_v2 to A62..

Else

     Set A39_PercentualProvisaoFinalAposRevisao_v2 to 1.00

End If

 

Maybe this isn't what you were trying to do but I thought it looks like the right approach.

          

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

2 REPLIES 2
dpoggemann
Super User
Super User

Hi @MarcosP ,

 

Looking at this, it appears you have two calculated fields and you are trying to set one value based on the other.  There is no specific order of precedence here so I am assuming this is why it is not working as expected.

 

Is there a reason you don't do a single calculated field that will have the following type of code?

 

If A2_Analiser_v2 = Nao

  AND a39_auxCalculodiv is less than 1

         Set A39_PercentualProvisaoFinalAposRevisao_v2 to A62..

Else

     Set A39_PercentualProvisaoFinalAposRevisao_v2 to 1.00

End If

 

Maybe this isn't what you were trying to do but I thought it looks like the right approach.

          

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

Thanks for answer! I resolved with something like that.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,840)