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 II
Super User II

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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (63,205)