Forum Discussion
Anonymous
6 years agoNot applicable
Rolling year
Hi guys I need your help with a calculation for a rolling year.
Here is the calculation: F% = A(currentmonth going back a year) + B (Full 12 months) - C(full 12 months) + D(full 12 months) - E(For selected month)
This calculation should be dynamic that you can display values for the 12 months.
Currently when I do it it displays the answer at a total level and not the individual months
2 Replies
- AntrikshSharma
Community Champion
If you are looking for running total then you could try something like this:
Running Total 2 = VAR MaxDateInFilterContext = MAX ( Dates[Date] ) VAR MaxYearInFilterContext = YEAR ( MaxDateInFilterContext ) RETURN CALCULATE ( [Total Sales], FILTER ( ALL ( Dates ), Dates[Date] <= MaxDateInFilterContext && Dates[Calendar Year Number] = MaxYearInFilterContext ) )or
Running Total = CALCULATE ( [Total Sales], DATESYTD ( Dates[Date] ) )