This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
@Anonymous,
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?
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 38 | |
| 29 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 36 | |
| 30 | |
| 25 | |
| 24 |