March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have done som reaserch on how to get a calculation on 12 month rolling details. I have not found a soultion that works because of the way my date table is set up. The value i need is 12 month rolling for each month for the collum NPT and Operation hours (duration). Then i need to calculate monthly 12 month rolling 12 month NPT in % of 12 month Operating hours
Solved! Go to Solution.
Hi @Richard79
Try a measure like this :
12 Months NPT=
Var MaxDate = MAX ( Dates[Date] )
Var MinDate = CALCULATE ( MIN ( Dates[Date] ), FILTER ( ALL ( Dates ), DATEADD ( Dates[Date], 1, YEAR ) "Greaterthan" SelectedMaxDate ) )
Return
CALCULATE ( SUM ( Table[NPT] ), ALL ( Dates ), Dates[Date] "LessThanOrEqualTo" SelectedMaxDate, Dates[Date] "GreaterThanOrEqualTo" MinDate )
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Richard79
Try a measure like this :
12 Months NPT=
Var MaxDate = MAX ( Dates[Date] )
Var MinDate = CALCULATE ( MIN ( Dates[Date] ), FILTER ( ALL ( Dates ), DATEADD ( Dates[Date], 1, YEAR ) "Greaterthan" SelectedMaxDate ) )
Return
CALCULATE ( SUM ( Table[NPT] ), ALL ( Dates ), Dates[Date] "LessThanOrEqualTo" SelectedMaxDate, Dates[Date] "GreaterThanOrEqualTo" MinDate )
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
22 | |
19 | |
11 | |
11 | |
7 |
User | Count |
---|---|
45 | |
36 | |
24 | |
10 | |
10 |