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 Apps / If combo box (from sha...
Power Apps
Answered

If combo box (from sharepoint list) = X and value from powerapps field = Y then do Z - formula help

(0) ShareShare
ReportReport
Posted on by 36

Hi there,

 

Relative newbie to PowerApps (learning fast) but hit a brick wall past few days.

 

I am trying to use the value of a combo box to determine what calculation to apply to a value. Really think I have this formula in a mess (long day!) going to chill and come back to it tomorrow. 👍

 

SO based on combo box value it will apply a set calculation routine (ignore values as made up for now, but hopefully logic explained. 

 

If(Value(product_name.Text)="Drop Down Value 1" && Value(cell_contrast.Text)<= 1,"4",Value(cell_contrast.Text)<= 2,"1",Value(cell_contrast.Text)<= 4,"5",Value(cell_contrast.Text)> 4,"6")

 

OR Value(product_name.Text)="Drop Down Value 2" && Value(cell_contrast.Text)<= 1,"4",Value(cell_contrast.Text)<= 2,"1",Value(cell_contrast.Text)<= 4,"5",Value(cell_contrast.Text)> 4,"6")

 

Any help or guidance greatly appreciated,

 

Thanks, 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @andy1982 

    With({pnt1:Value(product_name.Text)="Drop Down Value 1",
     vcct:Value(cell_contrast.Text),
     pnt2:Value(product_name.Text)="Drop Down Value 2"},
     If(
     pnt1 || pnt2,
     Switch(vcct,
     <= 1,"4"
     >1 && <= 2, "1",
     >2 && <= 4, "5",
     >4,"6",
     )
     )
    )

     

  • andy1982 Profile Picture
    36 on at

    @Drrickryp 

     

    Thanks for replying and looking at my question. I don't think I have explained myself properly or I haven't understood answer properly. 

     

    Depending on a drop down value (1,2 or 3) I want to apply a different set of calculations to  a single cell.

     

    // If drop down ID matches 


    If(Value(product_ID_edit.Text) = 1 && Value(cell_contrast_edit.Text) >0.802618, 5 , Value(cell_contrast_edit.Text) >=0.794976,4, Value(cell_contrast_edit.Text) =0.781671,3 , Value(cell_contrast_edit.Text) >=0.771985,2, Value(cell_contrast_edit.Text) <0.771985,1, 

     

    // if above isn't true (drop down id doesn't match) then check for next drop down value 

     

    Or(Value(product_ID_edit.Text) = 2 && Value(cell_contrast_edit.Text) >0.802618, 55 , Value(cell_contrast_edit.Text) >=0.794976,44, Value(cell_contrast_edit.Text) =0.781671,33 , Value(cell_contrast_edit.Text) >=0.771985,22, Value(cell_contrast_edit.Text) <0.771985,11, 

     

    // if above isn't true then check for next drop down value 

     

    Or(Value(product_ID_edit.Text) = 3 && Value(cell_contrast_edit.Text) >0.802618, 555 , Value(cell_contrast_edit.Text) >=0.794976,444, Value(cell_contrast_edit.Text) =0.781671,333 , Value(cell_contrast_edit.Text) >=0.771985,222,  Value(cell_contrast_edit.Text) <0.771985,111))

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @andy1982 

    With({vpid:Value(product_ID_edit.Text),
     vcc: Value(cell_contrast_edit.Text)
     },
     If(
     vpid = 1 && vcc > 0.802618,5,
     vpid = 1 && vcc >=0.794976,4, 
     vpid = 1 && vcc = 0.781671,3,
     vpid = 1 && vcc >=0.771985,2, 
     vpid = 1 && vcc < 0.771985,1, 
     vpid = 2 && vcc >0.802618, 55,
     vpid = 2 && vcc >=0.794976,44,
     vpid = 2 && vcc = 0.781671,33,
     vpid = 2 && vcc >=0.771985,22,
     vpid = 2 && vcc < 0.771985,11, 
     vpid = 3 && vcc >0.802618,555,
     vpid = 3 && vcc>=0.794976,444,
     vpid = 3 && vcc =0.781671,333,
     vpid = 3 && vcc>=0.771985,222,
     vpid = 3 && vcc< 0.771985,111
     )
    )
    
    
  • andy1982 Profile Picture
    36 on at

    @Drrickryp  thank you so much, makes sense and works!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard