Forum Discussion
Remove date filter from DAX measure
Hi everbody
I cant seem to get my DAX to work. I need it to not filter on any dates. But it still filters with dates on my calculation.
Hi CJensen ,
Based on your description, your DAX measure is functioning correctly for calculations it ignores the date slicer due to REMOVEFILTERS(Date). However, this only impacts the calculation, not the rows displayed in your visual.
If your visual, such as a table or matrix, is filtered by the slicer or uses the Date field directly, it will still only display the selected month, even though the measure calculates across all dates.
If you want to display all dates regardless of the slicer, you have a few options
- Remove the slicer’s interaction with the visual.
- Use a disconnected date table for filtering.
- Create a separate visual to show totals for all dates.
I hope that’s helpful. Let me know if you need any further assistance.
Regards,
Yugandhar.
5 Replies
- danextianSuper User
Hi CJensen
From the looks of it, your DAX should work as intended—unless the goal is to display all dates in a visual. In that case, filter modifiers only affect the calculation results, not the visibility of rows in the visual. Other than this there's just isn't enough information to go on with. Please refer to this post - https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- pankajnamekar25Super User
Hello CJensen
try this measure
CalcExample =
SUMX (
VALUES ( 'PlanningLines'[Key] ),
CALCULATE (
SUM ( 'PlanningLines'[LineAmount] ),
KEEPFILTERS (
'PlanningLines'[Linetype] = "Billable"
|| 'PlanningLines'[Linetype] = "Both Budget and Billable"
),
KEEPFILTERS ( 'Task No'[No] >= 2021 ),
REMOVEFILTERS ( 'Date' )
)
)
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn- CJensenHelper I
Hi Pankajnamekar25
Thank you so much for trying, it seems that I cant get it to drop the dates from the slicer no matter what. Ive tried your solution and it still only includes the values from the selected month- V-yubandi-msftCommunity Support
Hi CJensen ,
Based on your description, your DAX measure is functioning correctly for calculations it ignores the date slicer due to REMOVEFILTERS(Date). However, this only impacts the calculation, not the rows displayed in your visual.
If your visual, such as a table or matrix, is filtered by the slicer or uses the Date field directly, it will still only display the selected month, even though the measure calculates across all dates.
If you want to display all dates regardless of the slicer, you have a few options
- Remove the slicer’s interaction with the visual.
- Use a disconnected date table for filtering.
- Create a separate visual to show totals for all dates.
I hope that’s helpful. Let me know if you need any further assistance.
Regards,
Yugandhar.