Forum Discussion
Dynamic quarter chart without slicer
- 4 years ago
Hi Anonymous ,
I create the following Dates table and relationship.
Then please try the measure:
Measure = VAR CurrentDate = TODAY () VAR CurYear_Qua = CALCULATE ( MAX ( Dates[FY_Year] ) & MAX ( Dates[FY_Quarter] ), Dates[Date] = CurrentDate ) VAR Qua_FirstDay = CALCULATE ( MIN ( Dates[Date] ), FILTER ( ALL ( Dates ), Dates[FY_Year] & Dates[FY_Quarter] = CurYear_Qua ) ) RETURN CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( Dates, Dates[Date] >= EDATE ( Qua_FirstDay, -24 ) && Dates[Date] < Qua_FirstDay ) )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
I create the following Dates table and relationship.
Then please try the measure:
Measure =
VAR CurrentDate =
TODAY ()
VAR CurYear_Qua =
CALCULATE (
MAX ( Dates[FY_Year] ) & MAX ( Dates[FY_Quarter] ),
Dates[Date] = CurrentDate
)
VAR Qua_FirstDay =
CALCULATE (
MIN ( Dates[Date] ),
FILTER ( ALL ( Dates ), Dates[FY_Year] & Dates[FY_Quarter] = CurYear_Qua )
)
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
Dates,
Dates[Date] >= EDATE ( Qua_FirstDay, -24 )
&& Dates[Date] < Qua_FirstDay
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.