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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Solved! Go to Solution.
Well, you have to shift the dates one year back. So, something like:
CALCULATETABLE(
// This will move the entire
// selected period one year back.
DATEADD(
'Date'[DateTime],
-1,
YEAR
),
VAR MaxDate =
MAX( 'Date'[DateTime] )
VAR CurrentSelection =
FILTER(
ALLSELECTED( 'Date' ),
'Date'[DateTime] <= MaxDate
)
RETURN
CurrentSelection
)
Put this as the filter under your CALCULATE instead of your FILTER. This will be the running total for the same months but 1 year back. If you want to get the sum for all the selected months, then change your FILTER to be:
CALCULATETABLE(
// This will move the entire
// selected period one year back.
DATEADD(
'Date'[DateTime],
-1,
YEAR
),
ALLSELECTED( 'Date' )
)
Well, you have to shift the dates one year back. So, something like:
CALCULATETABLE(
// This will move the entire
// selected period one year back.
DATEADD(
'Date'[DateTime],
-1,
YEAR
),
VAR MaxDate =
MAX( 'Date'[DateTime] )
VAR CurrentSelection =
FILTER(
ALLSELECTED( 'Date' ),
'Date'[DateTime] <= MaxDate
)
RETURN
CurrentSelection
)
Put this as the filter under your CALCULATE instead of your FILTER. This will be the running total for the same months but 1 year back. If you want to get the sum for all the selected months, then change your FILTER to be:
CALCULATETABLE(
// This will move the entire
// selected period one year back.
DATEADD(
'Date'[DateTime],
-1,
YEAR
),
ALLSELECTED( 'Date' )
)
can you please explain it as i am unable to understand and i have asked the same question. will really be helpful if you could.
I have asked the same question in my this question
That worked perfectly, thanks a lot!
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |