Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Filter a gallery based on a previously clicked label



I created a canvas app and I added an Home page.

On this home page, I want to display the name of each user and their related records (records for which they are the owner).

But I don't really succeed to do this, and I don't know how I can handle that.

I would like to do a screen like below:











In this example, I created two labels, one for each user, because I don't want to display all users (some Microsoft's users that will never get any records associated with), and I put a Countif formula to count the number of records.


Depending on the label where the user will click, he will then see an other screen with a gallery filtered on the previous user selected:


















Maybe my idea of having two labels is not the good start.

Can someone give me hints to manage this requirement?



Super User
Super User

Hi @LauM ,

I suppose that your data source is a Sharepoint List.

On your home screen, you can put a gallery seted like:

Items -> GroupBy(AddColumns(your_data_source,"UserName", Author.DisplayName),"UserName","Result") 

and inside the gallery use 2 labels:

Label1 -> Text = ThisItem.UserName

Label2 -> Text = CountRows(Result)

OnSelect property of the gallery set a global variable:



Hope it helps !

Helper I
Helper I

Hi @gabibalaban ,


my data source is the Dataverse, where I have owners for my records:



Is it still possible to make your solution with only these data?



Yes, my proposed solution still stand on. Of course, you should  adapt some column name.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,325)