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,821 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,821 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 481

#2
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#3
11manish Profile Picture

11manish 291

Last 30 days Overall leaderboard