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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Sharma0815
Helper II
Helper II

How to stop applying external Date[MMM-YYY] filter on measure

Hi ALL,


I have a table contains my survey data and I mapped it with a Date table and I don't want to apply any value from my Date[MMM-YYYY] on my measure  created using survey table data.


Score =

CALCULATE (
DISTINCTCOUNT( Survey[responseid] ),ALL('Date','Date'[MMM-YYYY]),
FILTER ( Survey, Survey[category] = "Top2" && Survey[recordeddate] >= DATE(2020,11,1) )
)
1 REPLY 1
Anonymous
Not applicable

If you want to completely ignore any filters on 'Date', then you write:

Score =
CALCULATE (
    DISTINCTCOUNT( Survey[responseid] ),
    KEEPFILTERS(
        Survey[category] = "Top2"
    ),
    KEEPFILTERS(
        Survey[recordeddate] >= DATE(2020,11,1) 
    ),
    ALL( 'Date' )   
)

Also, filtering by a full fact table, Survey, as you do in your code is not only bad practice from many points of view, but more importantly it slows down your code to a great extent and sometimes can indeed be dangerous. One should always only filter by columns that are really needed. There's too much theory behind the above rules to explain here. If you want to know more, you can look for articles on www.sqlbi.com or read the book "The Definitive Guide to DAX".

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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