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 Pages / Issue with filtering a...
Power Pages
Suggested Answer

Issue with filtering a gallery - cannot understand the issue

(0) ShareShare
ReportReport
Posted on by 45
I'm trying to introduce a new filter menu to an App of mine - I wanted to use hierarchical checkboxes a bit like you'd find in PowerBI slicers.
I've got the foundations in place the expand/collapse is working, as is the selection of sub-categories.
Whilst I was going along the way, I created two collections. ColStagesExpanding and ColStatusExpanding
 
Oncheck property for the higher checkbox is
 
Collect(
    colStagesExpanding,
    ThisItem
);
Collect(
    colStatusExpanding,
    ShowColumns(
        Filter(
            colStatusLookup,
            Stage in colStagesExpanding
        ),
        Status
    )
)
 
Where colStatusLookup is a table that lists the status and it's corresponding stage
This works - I have 2 collections with the checked items (and it removes when unchecked) - all good so far
Now I want to apply the collections as filters to a Gallery, i.e. if the Stage in ColStagesExpanding then show those records (and/or/instead of - Status in ColStatusExpanding)
 
Filter(
    ColSearchRequests,
Status.Value in colStatusExpanding
//Stage in colStageswithExpanding
)
 
You can see I've commented out the Stage - I'll come to that
 
Using this for the items property of the gallery, it doesn't work - it just shows all records like the Filter doesn't match. But the collection is correct:
 
For reference, the ColSearchRequests is just a collection of ALL requests from a sharepoint list where I have done some tidying up (removing and renaming columns) which has a Status column which is an option column (hence the status.value)
 
Am I missing something really obvious? BTW - if I remove the status filter and include the stage filter it works perfectly
 
Thanks
Categories:
  • ronaldwalcott Profile Picture
    3,914 Moderator on at
    What is Status,Value in your example? It seems as if Status is a text field.
  • Suggested answer
    Inogic Profile Picture
    1,297 Moderator on at
    Hi,
     
    From our understanding, the issue you're facing seems to be related to the type of data in Status.Value and colStatusExpanding. Here are some things you can check and adjust to resolve the issue:
    Debugging Steps:
    1. Confirm Data Types
      • Ensure that Status.Value and the values in colStatusExpanding are of the same type. If Status.Value is text, colStatusExpanding should also contain text values.
    2. Flatten colStatusExpanding
      • Since colStatusExpanding is a table, you may need to extract a single-column table or list of values from it. For instance:
    Filter(ColSearchRequests, Status.Value in colStatusExpanding.Status)
    Here, colStatusExpanding.Status extracts the "Status" column from the collection.
    1. Ensure Proper Case and Matching
      • Verify that the case (uppercase/lowercase) of values in Status.Value matches those in colStatusExpanding.Status. Power Apps comparisons are case-sensitive.
    2. Test the Filter Independently
      • Create a label or temporary gallery, and use this as its Items property to test:
    colStatusExpanding.Status
    • Confirm that it returns the correct set of "Status" values.
    Next, create another gallery to test filtering:
                            Filter(ColSearchRequests, Status.Value = "Specific Value")
                            Replace "Specific Value" with a value you know exists in both the Status.Value and colStatusExpanding.
    •  
     
     
    1. Rebuild colStatusExpanding
    • If colStatusExpanding might have structural issues, ensure it's rebuilt properly:
    Collect(
        colStatusExpanding,
        ShowColumns(
            Filter(
                colStatusLookup,
                Stage in colStagesExpanding
            ),
            "Status"
        )
    )
    Final Fix
    For the gallery's Items property, try this refined filter:
    Filter(
        ColSearchRequests,
        Status.Value in ShowColumns(colStatusExpanding, "Status")
    )
    If you also want to include the Stage filter:
    Filter(
        ColSearchRequests,
        Status.Value in ShowColumns(colStatusExpanding, "Status") || Stage in colStagesExpanding
    )
    Explanation:
    • The ShowColumns ensures you're comparing the correct column (Status) within colStatusExpanding.
    • Using || allows filtering by either Status or Stage.
    Common Pitfalls:
    • Status.Value from the ColSearchRequests must be compatible with the data type and format of values in colStatusExpanding.
    • Ensure colStagesExpanding and colStatusExpanding are updated correctly when items are checked or unchecked.
    Hope this helps.
     
    Thanks!
    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 18 Super User 2026 Season 2

#2
Harshit Chaubisa Profile Picture

Harshit Chaubisa 4

#2
CU08101843-0 Profile Picture

CU08101843-0 4

Last 30 days Overall leaderboard