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 / Gallery only shows ite...
Power Apps
Answered

Gallery only shows items when there's a specific value

(0) ShareShare
ReportReport
Posted on by 242

Hey All,

 

Feel like I talk here more than I do to my own family lately! But hopefully my last question for at least a week 🙂

I have a collection, as shown below

JeckGill_0-1694005375118.png

 

I want to take only the RatingTitle when RatingScore is equal to "1" or "2" (or 1 or 2 - I am using a global choice if that changes anything"

At the moment I'm using the following, but get an "expected text value" error and don't understand why.

Filter(col_combined, RatingScore = "1" || RatingScore = "2").RatingTitle


I have also tried doing it the followign way, but promptly gave up when ChatGPT bullied me for it

If(
 Or(
 ThisItem.RatingScore = 1,
 ThisItem.RatingScore = 2
 ),
 ThisItem.RatingTitle,
)


Any advice or pointers is greatly appreciated, I feel like I'm being dense and missing something obvious here

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi

     

    You don't need to compare it to text values ("1" or "2"). Instead, you can directly compare it to numeric values.

     

    Filter(col_combined, RatingScore = 1 || RatingScore = 2).RatingTitle

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation. 

  • JeckGill Profile Picture
    242 on at

    I've tried that already actually, that's why I had the quotes - I should've mentioned that sorry 😅 without the quotes I get a blue underline under the equals signs that says "Incompatible types for comparison. These types can't be compared: Text, Number." as well as a red underline under the .RatingTitle that says "Expected Text value."

    I've tried adding .Text and .Value to the end to no avail

  • vaubeee Profile Picture
    533 on at

    Sounds like RatingScore returns Text, so try Value(RatingScore) = 1

     

    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • JeckGill Profile Picture
    242 on at

    JeckGill_0-1694009750556.png

    is this what you mean? if so, no dice 😕

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Can you share your Clear collection formula?

  • vaubeee Profile Picture
    533 on at

      .RatingTitle   is missing now.

     

    I rebuild it. Both working, so transformation with Value() is not necessary.

    Filter(col_combined, Value(RatingScore) = 1 || RatingScore = 2).RatingTitle
     
    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.
  • JeckGill Profile Picture
    242 on at

    I have 4 pages with ClearCollects that are the same as this one. They just create a collection for that page:

    JeckGill_0-1694010494821.png


    Then on the page that comes right before the one I am currently working on for the filter I have the following ClearCollect which combines the previous 4 into one large collection.

    JeckGill_1-1694010577051.png


    The output works, there's an example of it in the initial post - but I did mention that I use a global choice, so the dropboxes you see all use "Choices('Site Inspection Rating')". Could that have something to do with it?

  • JeckGill Profile Picture
    242 on at

    JeckGill_0-1694010713156.png

    I had tried it both with and without it - blue underline under the equals signs that says "Incompatible types for comparison. These types can't be compared: Text, Number." as well as a red underline under the .RatingTitle that says "Expected Text value."

  • JeckGill Profile Picture
    242 on at

    I just change your version there so that it is
    Filter(col_combined, Value(RatingScore) = 1 || Value(RatingScore) = 2).RatingTitle
    Now I just have the red underline for the expected text value 

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Try this

     

    Filter(MyCollection,RatingScore = "1" || RatingScore = "2")

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard