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 / Switch Function with B...
Power Apps
Answered

Switch Function with Between Values

(0) ShareShare
ReportReport
Posted on by 230

Hi - struggling to get this right, any thoughts?

 

Trying to take the value of a text input box and evaluate it using the switch funciton

 

Text(
 Switch(
 Value(SupportNeeded_23.Text),
 Value(SupportNeeded_23.Text) >= 0 && Value(SupportNeeded_23.Text) <= 10,
 0,
 Value(SupportNeeded_23.Text) >= 11 && Value(SupportNeeded_23.Text) <= 20,
 5,
 Value(SupportNeeded_23.Text) >= 21 && Value(SupportNeeded_23.Text) <= 30,
 8,
 Value(SupportNeeded_23.Text) > 30,
 11
 )
)
Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi @tlevine ,

     

    A switch function only works for exact matches of the outcome of the formula (first argument): https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-if

     

    Instead of a Switch()function you need to use If():

    Text(
     If(
     Value(SupportNeeded_23.Text) >= 0 && Value(SupportNeeded_23.Text) <= 10,
     0,
     Value(SupportNeeded_23.Text) >= 11 && Value(SupportNeeded_23.Text) <= 20,
     5,
     Value(SupportNeeded_23.Text) >= 21 && Value(SupportNeeded_23.Text) <= 30,
     8,
     Value(SupportNeeded_23.Text) > 30,
     11
     )
    )
  • Verified answer
    tlevine Profile Picture
    230 on at

    thank you!!!!

  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi  @tlevine ,

     

    Happy to read this resolved your issue. Can you please mark the right post as the solution so it's easier to find for other members of the community?

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 Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard