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 with sub galle...
Power Apps
Unanswered

Gallery with sub gallery filter

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have a business requirement where I need to filter distinct items in gallery and its sub-gallery.

 

For illustration, this should be the result.

 

danieller365_0-1679893261189.png

However, in my gallery this is the one that currently appears:

 

danieller365_2-1679893549184.png

 

 

Main gallery - Items property:

SortByColumns(Filter(M3L1,Col1=m3l1id),"OData__x0043_ol2")

 

Sub gallery - Items property:

SortByColumns(Filter(M3L1,Col1 = m3l1id,Col2 = ThisItem.Col2), "OData__x0043_ol2")

 

Every time I add a sub-item, it also appears in the main gallery. I tried the Distinct function but it returns a blank gallery. 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,638 Super User 2026 Season 1 on at

    Hi @danieller365 ,

     

    There is nothing in the formula of the main gallery to filter out the distinct value, so that is creating the issue. Try the below to group the items by 'Col2' whilst still having 'Col1' and 'OData__x0043_ol2' in there:

     

     

    SortByColumns(
    	AddColumns(
    		GroupBy(
    			M3L1,
    			"Col2",
    			"GroupedByItem"
    		),
    		"Col1",
    		First(GroupedByItem).Col1,
    		"OData__x0043_ol2",
    		First(GroupedByItem).OData__x0043_ol2
    	),
    	"OData__x0043_ol2"
    )

     

     

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard