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.
Hello,
I've created a few measures to calculate a metric showing the prior year and a trailing last year (from the last completed month). However, when I go to visualize these, using a visual level filter doesn't limit the data correctly on one of the measures.
Here are the 2 measures:
Cost Per Pound Prior Year = CALCULATE([Cost Per Pound],USERELATIONSHIP('tms_dw aym_invoiced_all'[master date],DateKey[Date]),DATEADD(DateKey[Date],-12,month))
Cost Per Pound Last Year Rolling = CALCULATE([Cost Per Pound],USERELATIONSHIP('tms_dw aym_invoiced_all'[master date],DateKey[Date]),DATESINPERIOD(DateKey[Date],EOMONTH(lastdate(DateKey[Date]),-1),-12,month))
Here is the result:
If I only include the Cost Per Pound Prior Year metric, then I can apply the visual level filter to only show the last 12 calendar months (using the DateKey[Date] field). However, if I include both, then the visual level filter doesn't properly filter.
Any help would be greatly appreciated.
Seth
Instead of time intelligence function, you could try to implement a custom DAX formula.
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/
Thanks Sam, but shouldn't the time intelligence functions work properly? The values are correct, but why won't it allow the visual level filter to apply properly?
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |