web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition built on cal...
Power Automate
Answered

Condition built on calclulation

(0) ShareShare
ReportReport
Posted on by 67

Say, I have a field A and B and I want to check is value in A is more than 20% of B. The result of this comparision I wanted to use a a condition for the remaining logic but I am failing to accomplish this task. 

 

It seemed simple as COndition

- A/B: div(float(triggerOutputs()?['var_A']), float(triggerOutputs()?['var_B']))

- is less than div(float(triggerOutputs()?['var_QUOTE']), float(triggerOutputs()?['var_REMVAL'])) *0.2

 

MarioOne_0-1700917038133.png

 

This hwoever renders the result as: 

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

I have checked if that may be related to decimal sign, but whatever I use DOT or COMA it still does not work. 

How to overcome this obstacle?

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @MarioOne 

     

    Could you pls share the values of all those four variables used in the condition?

     

    Thanks

  • MarioOne Profile Picture
    67 on at

    Hey Manish! Thank you for replay! I am having only two variables

    MarioOne_0-1700917642316.png

    and my Condition is:

    MarioOne_1-1700917690573.png

    Happy to hear from you! 🙂

  • Verified answer
    Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @MarioOne 

     

    Thanks for sharing the details with screenshot. You need to pass the variables in the div function but in your expression, you are passing those values from the trigger.

     

    Pls try the below expression:

    ManishSolanki_0-1700918395164.png

    div(variables('var_QUOTE'), variables('var_REMVAL'))

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • MarioOne Profile Picture
    67 on at

    It seem to work perforctly! When I used it initially without having variables created it failed - now, all seem to work perfectly. Thank you so much - Appreciate your help 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard