cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Is it possible to turn the tile value on flow into percentage?

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  Capturar.PNGbut didn't work. Not sure if it's possible. Also tried to change it using the expression option, no success.

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions

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!

 

View solution in original post

8 REPLIES 8
yashag2255
Dual Super User II
Dual Super User II

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),'%')

 

ddr.PNG\

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!

 

Anonymous
Not applicable

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!

Anonymous
Not applicable

This is my flow, the highlighted TileValue is the value that I want to see as percentage rather than decimal.

 

x.png

 

Hey @Anonymous 

 

You can refer to the flow below: 

ddew.PNG

 

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!

Anonymous
Not applicable

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!

 

View solution in original post

Anonymous
Not applicable

Thank you!!!!!!!!!!!!! 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

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

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (36,636)