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,
I have a matrix below, including customers and their KPIs, I need to keep the latest quarter sales by disabling the user's external filters like Year and Month. In other words, it is desired that the user's filter works on "TotalSales (PCS)" & "YOY%Change" and don't work on others.
I removed external filters on "Current Q" and "last 30 days" but it is almost impossible to remove that effect on the "Last Quarter."
I have tried the ALL() function, but it seems it doesn't work on the "PREVIOUSQUARTER()" function.
filters are as below,
all formulas are as below:
Solved! Go to Solution.
A different approach is to add the calculated column below to your date table:
Relative Quarter =
VAR vToday =
TODAY ()
VAR vResult =
DATEDIFF ( vToday, dDate[Date], QUARTER )
RETURN
vResult
Then rewrite your measure as follows:
last Quarter =
CALCULATE ( [TotalSales(PCS)], dDate[Relative Quarter] = -1 )
Proud to be a Super User!
A different approach is to add the calculated column below to your date table:
Relative Quarter =
VAR vToday =
TODAY ()
VAR vResult =
DATEDIFF ( vToday, dDate[Date], QUARTER )
RETURN
vResult
Then rewrite your measure as follows:
last Quarter =
CALCULATE ( [TotalSales(PCS)], dDate[Relative Quarter] = -1 )
Proud to be a Super User!
Thank you very much!
It seems that there is no way to remove the effect of external filters on the Time Intelligence built-in functions like "previous quarter" without creating a calculated column.
To remove the effect of external filters (year and month), I added the All() function to your formula:
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 |
---|---|
99 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
105 | |
86 | |
72 |