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 / Determine Where a Valu...
Power Apps
Answered

Determine Where a Value Sits Within a Set of Range

(0) ShareShare
ReportReport
Posted on by 49

Hello,

 

I have a sharepoint list with a column named "Score". Within my gallery I want to have a label display text of what category that score belongs to.  Example:  If Students have a score of 8 or 9 it should display they have an "A" for a score, if students have a score of 5-7 it should display they have a "B" for a score, etc.   I believe the If statement would be used for this. Thank you 🙂

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

    Hi @TONYSTORM ,

     

    Please try the below formula. 

    Switch(Thisitem.Score,9,"A",8,"A",...)

     

     

     Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • TONYSTORM Profile Picture
    49 on at

    Hi and thank you for responding so quickly.  I created a Label within the gallery and added the code to the label.  I am getting an error. 

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @TONYSTORM ,

     

    What is the error message your getting ? 

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Hi @TONYSTORM 

    Here's an example of how you would do this with an If statement.

     

    With({input:Value(ThisItem.Score)},
     If(input >= 8, "A",
     input >= 5, "B",
     input >= 3, "C",
     "Fail"
     )
    )

     

    There are more details in my post here:

    http://powerappsguide.com/blog/post/formula-how-to-use-the-if-and-switch-functions

     

  • Verified answer
    TONYSTORM Profile Picture
    49 on at

    Thank you!  That totally worked :-).  Ok so I have it giving the result in the gallery now.  How would I filter the gallery by that result?  This is what I have in the Item area of the my gallery.

     

    Sort(Filter('RECENT COMMENTS',DATE >= Dropdown1_2.Selected.StartDate,DATE <= Dropdown1_2.Selected.EndDate,
    
    EMAIL.Email=LCDropdownEmailAddresss.SelectedText.Result),DATE)

     

  • TONYSTORM Profile Picture
    49 on at

    Let me clarify, I'll be using a second dropdown to filter by grade.

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 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard