Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Namdu_PAU
Frequent Visitor

Count Total Rows while Ignoring Column Filters

Hey all,

 

Intermediate user to PBI here asking for help around a calculation.

I am currently trying to summarise training results for the business and have 3 connected tables:

 

Namdu_PAU_0-1731899301113.png

 

My task is to (for every trainee) calculate the % completed for each training group.

My approach to this was to create a table and use SUMMARIZE.

However, I am having trouble with the calculation for the total # column.

 

Namdu_PAU_2-1731900410037.png

 

I would like the "Total # Courses" to display the total number of available courses for that training group.

For example, the first 3 rows, Total # Courses should be: 31, 43 and 11 respectively.

However instead it is simply showing me a filtered count based on User Name.

 

It feels like such a simple DAX code but I simply cannot work it out.

 

Any help is sincerely appreciated.

 

Regards,

Namdu

1 ACCEPTED SOLUTION
Namdu_PAU
Frequent Visitor

I have managed to solve it myself!

 

The DAX Code is: 

"Total # Courses", CALCULATE(COUNTROWS(Curriculum),ALL(Curriculum),VALUES(Curriculum[Training Group]))
 

It is now correctly counting the total number of courses within the group. My problem was using "ALLSELECTED" or "ALLEXCEPT", these filters kept the row context filters. I had to first use the ALL function, and then specify the values.

View solution in original post

6 REPLIES 6
Namdu_PAU
Frequent Visitor

I have managed to solve it myself!

 

The DAX Code is: 

"Total # Courses", CALCULATE(COUNTROWS(Curriculum),ALL(Curriculum),VALUES(Curriculum[Training Group]))
 

It is now correctly counting the total number of courses within the group. My problem was using "ALLSELECTED" or "ALLEXCEPT", these filters kept the row context filters. I had to first use the ALL function, and then specify the values.

Namdu_PAU
Frequent Visitor

It looks like the previous link deletes the file after it has been downloaded once.
Use this instead: https://www.dropbox.com/scl/fi/e07bdgdvzg4m5j52susi8/PBI_Help_Counting-Training-Courses.pbix?rlkey=w...

Ritaf1983
Super User
Super User

Hi @Namdu_PAU 

Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.  

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi Rita,

 

Thank you so much for such a quick reply!

I thought I was being really clear, but that is okay, I have created mini datasets that I am able to share - please see link to pbix: https://file.io/Oqohb6riIWQB 

 

As for what i am trying to achieve:
Cert 1 training group has 31 total courses, however the table is counting 52.

I would like to have a total count for every single training group.

 

Namdu_PAU_1-1731904449069.png

Namdu_PAU_2-1731904472863.png

 

The links you've posted are all unavailable. Please use dropbox, google or onedrive.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hey Danex,

 

Yep sorry, I was on my work PC and didn't have access to the other sharing platforms. Please see the link below:

 

https://www.dropbox.com/scl/fi/e07bdgdvzg4m5j52susi8/PBI_Help_Counting-Training-Courses.pbix?rlkey=w...

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors