Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |