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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Wkeith
Helper II
Helper II

Trying to Count Total Number of Rows that ignores one filter but not the rest of the filters

Basically, I have a count function that is trying count rows based on two slicers. One slicer is a date slicer and the other is a product category slicer. I want to ignore the product category slicer but keep the date slicer for the count. Therefore, for example, I am counting all products between two dates (lets say 1/1/2019 and 6/30/2019) even when a user selects a specific product from the other product category slicer. 

 

I have two tables. One that I am counting transactions, FactSales, and one with dates that is connected to FactSales, DimDate. 

 

 

Current forumla: 

Count Test = CALCULATE(COUNT(FactSales[RevenueRecognitionDate]),ALLEXCEPT(dimdate,DimDate[DateKey]))
 
 
However, this formula gets filtered by the product category filter on my dashboard therefore retuning only that specfic categories sales for that time period instead of returning all products in that time period. 
 
I want to ignore the product category slicer but still filter for the date range slicer.
 
 
Let me know if you can help! 
1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

You're naming the wrong table in your ALLEXCEPT.

 

You don't want all the data from the dimDate table except keeping what's filtered by the date slicer, you want all the data from the FactSales table, except keeping what's filtered from the date slicer.

 

Count Test = CALCULATE(COUNT(FactSales[RevenueRecognitionDate]),ALLEXCEPT(FactSales,DimDate[DateKey]))

View solution in original post

1 REPLY 1
Cmcmahan
Resident Rockstar
Resident Rockstar

You're naming the wrong table in your ALLEXCEPT.

 

You don't want all the data from the dimDate table except keeping what's filtered by the date slicer, you want all the data from the FactSales table, except keeping what's filtered from the date slicer.

 

Count Test = CALCULATE(COUNT(FactSales[RevenueRecognitionDate]),ALLEXCEPT(FactSales,DimDate[DateKey]))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.