Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
HI everyone,
I am creating an overview where I display through a DAX measure the quantity of the current year but also the quantitay of the previous years. The problem is that I also have a slicer toch choose the months of the current year in the report. Through this slicer the values of the previous year disappear of course. Is there a way to exclude in these dax measures the consideration of the slicer?
Thanks.
Solved! Go to Solution.
Yes. You need to remove the value from the slicer using ALL.
In your case:
Quantity 2019 =
CALCULATE (
[Total Quantity],
FILTER ( ALL ( Dim_Date ), Dim_Date[YEAR] = 2019 )
)
Proud to be a Super User!
Paul on Linkedin.
Is the slicer from the Dim_Date table?
Proud to be a Super User!
Paul on Linkedin.
No it´s not 🙂 Okay I think I got you. Thank you!
Yes. You need to remove the value from the slicer using ALL.
In your case:
Quantity 2019 =
CALCULATE (
[Total Quantity],
FILTER ( ALL ( Dim_Date ), Dim_Date[YEAR] = 2019 )
)
Proud to be a Super User!
Paul on Linkedin.
Hi @PaulDBrown ,
My current formula looks like this - does the one you showed before have a different impact?
Thanks.
If you need tha value for the whole year, use something along the lines of:
Value 2919 =
CALCULATE ( [Sum Value], FILTER ( ALL ( 'Table' ), 'Table'[Year] = 2019 ) )
If you want the value of 2019, but for the same month as is selected:
Value Same Period 2019 =
CALCULATE (
[Sum Value],
FILTER (
ALL ( 'Table'[YearMonth] ),
'Table'[YearMonth]
= 201900 + SELECTEDVALUE ( 'Table'[Month] )
)
)
Proud to be a Super User!
Paul on Linkedin.