cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Best way to count rows based upon multiple column filter criteria

Hello,

 

I want to offer a user 3 optional drop downs (or filters) each one relates to a separate column in my table (Manager, Period, Region) A 4th Drop down (which will be mandatory) is a list of Skill scores (1 through 7) relating to a SKILL column in my table. So they will select a skill score and I want to count the number of rows for that skill in the SKILL column. However, they can use the 3 drop downs to filter further.  Problem is they might opt to choose any combination of the filters or none at all, leaving them at their default values.

 

I have tried to create some nested IF statements to CountIF the SKILL column but the code is getting huge and difficult to maintain. 

  

Can anyone think of a better way to acomplish this?

 

Thanks for any tips

2 REPLIES 2
Highlighted
Post Prodigy
Post Prodigy

Re: Best way to count rows based upon multiple column filter criteria

Hi @winwell

 

What about CountRows(Filter(<datasource>, ((Filter1=Filter1)  && (Filter2 = Filter2) &&(Filter3 = Filter3)))

 

Regards

 

Nigel

Highlighted
Frequent Visitor

Re: Best way to count rows based upon multiple column filter criteria

THanks but I already tried that.

 

The drop downs default value is "Select" so if left to the defaults, that kind of query doesn't work.I tried checking for the selected value and if it is "Select", count all rows and if there is a selected value include that drop down as a filter criteria, but then you have to cater for the other 2 drop downs and the combinations are many.

 

I might have to limit the user to just 2 filters (e.g Region and Period) at a time.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,268)