Announcements
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 🙂
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.
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.
What is the error message your getting ?
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
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)
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 551
WarrenBelz 430 Most Valuable Professional
Valantis 298