cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CtX
Level: Powered On

Can someone explain why this expression doesn't work/The meaning of this error?

Hello, I've been trying to show the tile value from these B.I dashboards as percentage rather than decimals but for some reason it gives me that error. The expression that I'm using is: 

concat(mul(triggerBody()?['tileValue'],100),'%'
Is there anything wrong about it? Also is it even possible to turn the tile value into percentage? 
 

test3.png

 

Sometimes it says that tile value is null even though the tile value isn't.

Also tried this expression concat(mul(coalesce(triggerBody()?['tileValue'],0),100),'%') it went through the compose but failed the condition presenting the following error:
 test4.PNG
 
Any ideas/suggestions?
 
1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Can someone explain why this expression doesn't work/The meaning of this error?

Hey @CtX 

 

Direct rounding off is currently not supported. But here is an expression that can help you: 

concat(div(float(first(split(string(mul(triggerBody()['number'],10000)),'.'))),100),'%')

This rounds off the decimal to two places. You can increase the mul value from 10000 to 1000000 for two more places. And replace the trigger body part with the attribute that you have. 

 

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

6 REPLIES 6
Super User
Super User

Re: Can someone explain why this expression doesn't work/The meaning of this error?

I can confirm your expression is great, i just tested it with a manual flow with the input of a number.

 

If you just put the tile value by itself in a compose with no expression what result do you see?

Super User
Super User

Re: Can someone explain why this expression doesn't work/The meaning of this error?

also your expression has the value coming from the triggerBody.

 

By the look of your screenshot you need it coming from the action prior to the compose.

 

Cheers

 

Chris

Dual Super User
Dual Super User

Re: Can someone explain why this expression doesn't work/The meaning of this error?

Hey @CtX 

 

What action are you using? This  looks like you are using two triggers in one flow. Can you check and confirm that? The standard and best practice to use only one trigger in a flow. However, if it is working for you as expected, you can use the below expressions: 

 

concat(mul(body('Impedimento_-_Cortes')?['tileValue'],100),'%') 

and for the other one: 

concat(mul(body('Anexo_-_III')?['tileValue'],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!

CtX
Level: Powered On

Re: Can someone explain why this expression doesn't work/The meaning of this error?

I had 3 triggers on that flow but I followed your instructions rebuild the whole thing and now it's working fine just got the first test and boom!  value came as 12.3232323232323%, is there a way to round it? at least 4 decimals

CtX
Level: Powered On

Re: Can someone explain why this expression doesn't work/The meaning of this error?

Awesome tip, I followed the instructions made it finally work as I needed!!!!!!!! now I gotta find how to round the tile values, I received the following value 12.3232323232323%, I'd like to receive something like 12.3% or 12.32% instead. Tried looking for a round value expression but no success.

Dual Super User
Dual Super User

Re: Can someone explain why this expression doesn't work/The meaning of this error?

Hey @CtX 

 

Direct rounding off is currently not supported. But here is an expression that can help you: 

concat(div(float(first(split(string(mul(triggerBody()['number'],10000)),'.'))),100),'%')

This rounds off the decimal to two places. You can increase the mul value from 10000 to 1000000 for two more places. And replace the trigger body part with the attribute that you have. 

 

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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,352)