Can someone help with syntax, please.
I want to round the significant figures out a calculated SharePoint column to 0. As in this post, the SharePoint returns a text value and I want to convert the dynamic field item()['DaysLeft'] inside a 'select' action.
How do I make the following expression work?
div(float(int(mul(div(variables('Sum'),5),10))),10)
I tried substituting variables('Sum') with item()['DaysLeft] but no luck.
Is there a more elegant solution?
Any help appreciated. Thanks.
Actually, just dropping your insignificant digit probably isn't exactly what you want - you'd rather round it, I guess.
Unfortunately, Flow doesn't have any number rounding that I know of (hint, hint), but I have hope that it will sometime soon.
Meanwhile, here's a more complete solution with rounding your insignificant digits. The strategy to rounding is to add 1 if the decimal is above 0.5 before dividing, instead of just substracting the decimal.
div( add( mul(float(item()?['DaysLeft']), 10), 1), if ( greater( mod(mul(float(item()?['DaysLeft']), 10), 1), 0.5 ), 1, 0 ) ), 10 )
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
274 | |
229 | |
78 | |
38 | |
37 |
User | Count |
---|---|
345 | |
228 | |
121 | |
70 | |
55 |