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 2 measures, where depending on the date filters selected, I show:
Last 12 months:
CALCULATE
(
[Xyz] , DATESINPERIOD ( 'Date'[Date] , MAX('Date'[Date]) , -12 , MONTH )
)
I need to do the same, but for months -12 to -24.
I have tried, but DATEADD doesn’t seem to work with MAX…
var dat = MAX('Date'[Date])
RETURN
CALCULATE
(
[Xyz] ,
DATESINPERIOD(
'Date'[Date],
DATEADD(dat,-12,MONTH) ,-24,MONTH)
)
How can I make the period from -12 to -24 ?
@ovonel , Try like
Rolling 12 till last 12 month = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],maxX(Sales, dateadd(Sales[Sales Date],-12,month)),-12,MONTH))
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 |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
53 | |
46 | |
15 | |
12 |