Reputation: 1
I need to create a graph with 3 values compared: "Last Year Running Totals" vs "Present Year Running Totals" vs "Cumulative Budget". The biggest problem that I have is that my customer uses a different calendar (almost like a Finacial calendar ) but does not have a fixed date every year for the beginning and the end.
For example, the year 2024 starts on 2023/12/30 and ends on 2024/12/27, while 2025 starts on 2024/12/28 and ends on 2025/12/26. So based on this calendar, the first "week" of 2024 starts on 2023/12/31 while the first "week" of 2025 starts on 2024/12/28.
I managed to create the measures as follows:
- TotalYTD 2024 =
CALCULATE(
SUM('Fact'[Fatturato Netto]),
FILTER(
ALL(Dim_Data),
(Dim_Data[ANNO KW] = 2024 &&
(Dim_Data[Data] <= MAX(Dim_Data[Data]))
)
))
- TotalYTD 2025 =
CALCULATE(
SUM('Fact'[Fatturato Netto]),
FILTER(
ALL(Dim_Data),
(Dim_Data[ANNO KW] = 2025 &&
(Dim_Data[Data] <= MAX(Dim_Data[Data]))
)
))
- Cumulato Budget 2025 =
CALCULATE
(TOTALYTD
(SUM('Fact'[budget]),Dim_Data[Data]),Dim_Data[ANNO KW]=2025)
I have correct numbers if I want to see it as a table, but cannot use a graph visual with the "client week number" on the X-axis, because the 2024 data is just a straight line, with the same value.
Do you have any idea that could help?
Upvotes: -3
Views: 14