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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
DebbieE
Community Champion
Community Champion

Count Items not in the slicer

Here is my example model

 TerstModel.JPG

And I wanted to see for example Reports not in the Date slicer

reports.png

the table contains for example reportName and the measure created with this DAX

 

Is Not in the Date Filter Flag =
// assumes DimReport[Report] is in the visual
// assumes a slicer on DimDate[ActivityDateKey]
VAR VActivityDates = SELECTCOLUMNS(DimDate,"Dates", DimDate[DateKey])
VAR VDates = CALENDAR(MINX(DimDate,DimDate[DateKey]),MAXX(DimDate,DimDate[DateKey]))
RETURN
IF(COUNTROWS(INTERSECT(VActivityDates,VDates)),0,1)
// if no matching rows, return 1
 
this is fantastic and works as you can see above. I use it for both reports and datasets. However I would like to Count the number of reports not used this month. And count the number of DataSets not used this month and I havent managed to figure out how to do this yet. Whether I sit something on top of this DAX or Create New DAX measure.
 
I tried 
Total Reports not in date Filter = CALCULATE([# reports],ALLEXCEPT(DimDate,DimDate[DateKey]))
But I get back 4  (All of them) and not the 2 that are outside of the September Filter
 
Any ideas would be great

 

1 ACCEPTED SOLUTION
DebbieE
Community Champion
Community Champion

I think I may have sussed it

 

Total Reports not in date Filter =
//Clear all filters which are applied to the specified table.ALLCROSSFILTERED
var VAllReports =CALCULATE([# reports],ALLCROSSFILTERED(DimDate))
//Total within the date filter
var VInFilter = [# reports]
//All reports - Reports inside the slicer
Return VAllReports-VInFilter

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@DebbieE 
ALLEXCEPT in measures do not work as same in calculate columns. Glad you solved.

 

 

Paul Zheng _ Community Support Team

 

DebbieE
Community Champion
Community Champion

I think I may have sussed it

 

Total Reports not in date Filter =
//Clear all filters which are applied to the specified table.ALLCROSSFILTERED
var VAllReports =CALCULATE([# reports],ALLCROSSFILTERED(DimDate))
//Total within the date filter
var VInFilter = [# reports]
//All reports - Reports inside the slicer
Return VAllReports-VInFilter

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.