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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Filter in DAX ignores date slicer

Hi everyone,

 

I created a measure in DAX with the calculate function. It counts all orders but filters the date to be equal to or greater than 20. January. This means that the measure counts all orders between 20 and 30 January. This works fine but inside my report, I have a date slicer where you can slice all days in this current month (1 to 30 January). The problem is that the measure I created ignores the date slicer, so if I use the slicer to see from 1 January to 15 January then it shows the same number as 20 to 30 January. It should instead just show 0. 

How can I fix this? And can anybody help? 🙂
Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try this

 

Orders (After 20 January) = 
CALCULATE(COUNT('Table 1'[Order ID])filter('table 1','Table 1'[Coffee]="Yes"&& 'Table 1'[Created]>=DATE(2020;1;20)))/
CALCULATE(COUNT('Table 1'[Type]);filter('table 1','Table 1'[Type]="Espresso"
&& 'Table 1'[Created]>=DATE(2020;1;20)))

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

Share your current calculations. You might be using all on date column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak @Anonymous 

 

Orders (After 20 January) = 
CALCULATE(CALCULATE(COUNT('Table 1'[Order ID]);'Table 1'[Coffee]="Yes")/
CALCULATE(COUNT('Table 1'[Type]);'Table 1'[Type]="Espresso");
'Table 1'[Created]>=DATE(2020;1;20))

 

 

Anonymous
Not applicable

Try this

 

Orders (After 20 January) = 
CALCULATE(COUNT('Table 1'[Order ID])filter('table 1','Table 1'[Coffee]="Yes"&& 'Table 1'[Created]>=DATE(2020;1;20)))/
CALCULATE(COUNT('Table 1'[Type]);filter('table 1','Table 1'[Type]="Espresso"
&& 'Table 1'[Created]>=DATE(2020;1;20)))

 

Anonymous
Not applicable

@Anonymous  Amazing!!!!

Anonymous
Not applicable

can you share your measure to see what's the issue?

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.