I've created a POWER BI dashboard and a flow to monitor alerts/send me an email whenever a value is reached but I found a problem which I wasn't able to solve the tile value extracted from POWER BI comes as decimal instead of percentage (On my dashboard it shows as Percentage though).
An example of the current situation:
WORK ORDER PERCENTAGE: 0.9548736462 instead of WORK ORDER PERCENTAGE: 95.4%
I tried to format the html code but didn't work. Not sure if it's possible. Also tried to change it using the expression option, no success.
Any suggestions?
Solved! Go to Solution.
Hey @Anonymous
This error means that there is no value that has been passed on the Title Value attribute for this flow run. If there is no value for that which means it is null and it will cause the flow to fail. If you want to check for null values in the expression, you can modify the expression as :
concat(mul(coalesce(triggerBody()?['tileValue'],0),100),'%')
This will check if the title value is empty and if so, will return 0.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hey @Anonymous
The percentage value comes in as mod 100 so that is why it is giving you a decimal value. One way of solving this would be using the concat and mul functions. mul function to multiply the value with 100 and concat to add the '%' sign:
Sample:
concat(mul(triggerBody()['number'],100),'%')
\
Hope this helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
This might seem dumb but where do I insert it?
I've tried a few things but didn't work, how should I proceed?
Hey @Anonymous
Can you share a screenshot of your flow?
If not, you can add a compose action in the flow and then in the action inputs, on the expression editor, type
concat(mul(tile,100),'%')
instead of tile, switch to the dynamic selector and select the Tile Value attribute from there. The expression should now have the tile value over there and then you can use the output of this compose action in the further step where you are selecting the 'Tile Value' in the html as shown in your screenshot.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
This is my flow, the highlighted TileValue is the value that I want to see as percentage rather than decimal.
Hey @Anonymous
You can refer to the flow below:
Expression in the compose action:
concat(mul(triggerBody()?['tileValue'],100),'%')
Hope this Helps!
Were you able to resolve? If this issue is resolved, please mark the response that helped you as 'Accept as Solution'. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
It really helped, I'm satisfied with the result cause now I know it's possible to turn decimals into percentage!
me cause know i understand how it's done but in the end it presented the following error:
"InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2772': 'The template language function 'mul' expects its first parameter to be an integer or a decimal number. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#mul for usage details.'."
I'll look into it, grateful for the support!!!!
Hey @Anonymous
This error means that there is no value that has been passed on the Title Value attribute for this flow run. If there is no value for that which means it is null and it will cause the flow to fail. If you want to check for null values in the expression, you can modify the expression as :
concat(mul(coalesce(triggerBody()?['tileValue'],0),100),'%')
This will check if the title value is empty and if so, will return 0.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thank you!!!!!!!!!!!!!
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
40 | |
10 | |
8 | |
7 | |
7 |
User | Count |
---|---|
62 | |
22 | |
12 | |
11 | |
11 |