cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AislingFaulkner
Helper II
Helper II

Count records relating to filtered gallery

Hi all,

 

I have a SP list with multiple columns, one being employee number and one being location. I need to show the top 5 most used locations for each employee.

 

At the moment I have one gallery that does some calculations based off a user selection of the employee number.

 

I would like to have a separate gallery where it would show the top 5 locations that the employee uses.

 

The code I've come up with so far is 

CountRows(Filter('All Fuel Query Data', Dropdown2.Selected.Result = 'Employee Details' in Location))

 

Does anyone know how to filter Count functions? 

3 REPLIES 3
Drrickryp
Super User II
Super User II

@AislingFaulkner 

CountRows(Gallery1.Allitems)

Hi @Drrickryp unfortunately that doesn't work. I need to take the user inputted employee number, and filter records according to that. 

Drrickryp
Super User II
Super User II

@AislingFaulkner 

Would something like this work.  The formula for the gallery is below it and the formula for counting the rows is inside.  It splits a contact list into states and cities and counts the rows in the "RestofData" subgallery inside. _1.png

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

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

Top Solution Authors
Top Kudoed Authors
Users online (40,558)