Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
Need a little help with working this out please.
Trying to calculate the moving range between a month and the previous month over a dataset (roughly 18 months). I have been using the below, but after testing it appears to be wrong.
Solved! Go to Solution.
@JamesSPBI , Try updating measure as
MovingRange =
VAR CurrentMetric = [Metric]
VAR PreviousMetric = CALCULATE(
[Metric],
PARALLELPERIOD(DateTable[StartOfMonthDate], -1, MONTH)
)
RETURN
ABS(CurrentMetric - PreviousMetric)
Proud to be a Super User! |
|
@JamesSPBI , Try updating measure as
MovingRange =
VAR CurrentMetric = [Metric]
VAR PreviousMetric = CALCULATE(
[Metric],
PARALLELPERIOD(DateTable[StartOfMonthDate], -1, MONTH)
)
RETURN
ABS(CurrentMetric - PreviousMetric)
Proud to be a Super User! |
|
To use the time intelligence functions, you must create a calendar table.