cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

MS Flow - condition wrongly evaluates on calculated column

I have SharePoint List with calculated column. It is calculated from subtracting planned and actual date, and formatted as number. I am trying to apply simple condition on this column like below:

Condition.png

but it is not evaluating correctly. Previously I have tested my flow using integer values and all worked OK.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: MS Flow - condition wrongly evaluates on calculated column

I was ably to evaluate condition correclty after applyig INT() function in "Compose".

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: MS Flow - condition wrongly evaluates on calculated column

@zwornik80 

I have seen calculated columns misbehave before... 

You might try using a compose action before your condition and setting it equal to the calculated column.  Then use the output of the compose action in your condition.  If that does not work, then please pose a screen shot of the output of the compose action.  Does the output of the compose action show the value that you believe is in the calculated column?

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Helper III
Helper III

Re: MS Flow - condition wrongly evaluates on calculated column

@ScottShearer  Do You mean to uses such expression in Compose:

```equals(body('Get_items')?['value'],0)``` 

and this ouptut compare in "Condition" action with "is equal to 0" ?

Highlighted
Super User III
Super User III

Re: MS Flow - condition wrongly evaluates on calculated column

@zwornik80 

Without seeing your Flow. I can't tell you what the expression will look like.  However, I am saying that you should add a compose action before your condition.  Select the calculated column from dynamic properties - Flow will take care of the expression.  Then, reference the Compose action output in your condition.

The advantage of this is that it makes it easy to see what the condition is evaluating by checking the output of the Compose action in a run.

If this does not work for you, you'll need to do the math inside of Flow to find the difference between the two dates.  That will take a few actions to accomplish.  The dates need to be converted to ticks.  Subtract one from the other and then divide by the number of ticks per day to find the difference in days.  If you need to go this way, let me know and I'll provide an example.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Helper III
Helper III

Re: MS Flow - condition wrongly evaluates on calculated column

@ScottShearer Thanks for tips. I have applied "Compose" on calculated column but that did not help.

 

It is unbelievable how unfriendly is working with MS Flow. I would never ever recommend anybody to use it. If I am setting format form my calculated value as number, and formula is having ROUND operator to ensure it returns only integers – then why simple compare operations are not working on this calculated column. It is also extremely slow. Summary calculations for ~300 rows and 24 columns takes 1h. Even if it takes some If operation it should not take that long. Any programming language would calcuate it in less then 1s.

Highlighted
Helper III
Helper III

Re: MS Flow - condition wrongly evaluates on calculated column

I was ably to evaluate condition correclty after applyig INT() function in "Compose".

View solution in original post

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (5,126)