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 Automate
Answered

If Function

(0) ShareShare
ReportReport
Posted on by 65

I am trying to create a flow for following case:

 

Input value needs to be evaluated for following conditions:

If input value < 22 then multiply input value with 1.25

or if 22 >/= Input value < 55 then multiply input value with 1.15

or if input value >/= 55 then multiply with 1.1

 

The flow should be able to evaluate input value (which can be any number which user will input) among above 3 condition and then deliver a single output as per the above 3 conditions.

 

I tried using compose for input value and then used if command in compose . However I am getting error. 

I understand that the above problem may be solved with conditional function in power automate but that will consume more API hence thought of going with compose if option to get max benefit in min. steps.

Pls let me know if above problem can be solved using compose function.

 

svivek_0-1658573743915.png

 

Compose function expression used baove:

if(less(outputs('sample'),22),mul(outputs('sample'),1.25),if(lessOrEqualsoutputs('sample'),55,mul(outputs('sample'),1.15),mul(outputs('sample'),1.1)))

 

svivek_1-1658573845706.png

 

 

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Read the description of if() function - you are using it wrong way.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi  @svivek ,

     

    Please try:

    if(
     less(outputs('sample'),22),
     mul(outputs('sample'),1.25),
     if(
     lessOrEquals(outputs('sample'),55),
     mul(outputs('sample'),1.15),
     mul(outputs('sample'),1.1)
     )
    )

     

    Best Regards,

    Bof

  • svivek Profile Picture
    65 on at

    Hi @v-bofeng-msft 

    Thanks for the solution. It worked.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard