Forum Discussion
Rolling calculation formula help
- Anonymous7 years ago
I tried the code you gave and it seems to still give me issues. I think it is messing up with the different department budgets, but unsure.
For this example i have two department payrolls in separate matrix, then filtered to only be that certain department. Here is what they look like. I have also added a OneDrive link to the two tables that are used for these matrix.
I tried the code you gave and it seems to still give me issues. I think it is messing up with the different department budgets, but unsure.
For this example i have two department payrolls in separate matrix, then filtered to only be that certain department. Here is what they look like. I have also added a OneDrive link to the two tables that are used for these matrix.
Hi Anonymous,
Please make sure your sample doesn't contain anything sensitive.
There are two solutions in the attached demo. Please download it. If you'd like the [solution 2] that needs no new table, please delete the relationship between [Calendar] and [Glentry].
% Spent Exp 2 = CALCULATE ( SUMX ( SUMMARIZE ( GlEntry, Glaccount[Account], 'Calendar'[Date].[Year], 'Calendar'[Date].[Month], "%Spent", DIVIDE ( SUM ( GlEntry[Expense] ), MAX ( GlEntry[Expense Budget] ) ) ), [%Spent] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) )
Best Regards,