Forum Discussion
DAX problem calculating Prior Fiscal YTD
- Anonymous9 years ago
Hi Yunka,
If Understanding is right you need the running total upto the week for the previous year.
If so just a small tweak to your expression will do. Change the LYMetric as
LY Metric:=CALCULATE([Production Revenue], FILTER(ALL(Dates), Dates[FiscalWeek] <= MAX(Dates[FiscalWeek]) && Dates[FiscalYear] = MAX(Dates[FiscalYear]) - 1))
Change is highlighted in bold colour.
Cheers
CheenuSing
Thanks for your help Anonymous. This kind of helps. I do have year, month and week for my fiscal dates calculated already in my dates table. This formula now gets me the last year fiscal numbers broken down by week but I need a total by fiscal year, not each individual fiscal week. The grand total for the fiscal year isn't calculating, it's only calculating by the week. How do I change this to get the total for the fiscal year up until the current week? I do have a column in my dates table for the current week number too.
LY Metric:=CALCULATE([Production Revenue], FILTER(ALL(Dates), Dates[FiscalWeek] = MAX(Dates[FiscalWeek]) && Dates[FiscalYear] = MAX(Dates[FiscalYear]) - 1))
Hi Yunka,
If Understanding is right you need the running total upto the week for the previous year.
If so just a small tweak to your expression will do. Change the LYMetric as
LY Metric:=CALCULATE([Production Revenue], FILTER(ALL(Dates), Dates[FiscalWeek] <= MAX(Dates[FiscalWeek]) && Dates[FiscalYear] = MAX(Dates[FiscalYear]) - 1))
Change is highlighted in bold colour.
Cheers
CheenuSing
- Yunka9 years agoAdvocate I
Thank you Anonymous, that works!