Forum Discussion
Elenazhilina
Feb 28, 2021Copper Contributor
running total in pivot table when grouping dates
in my file there are sums in the context of dates. I formed a pivot table where in the rows of the date, in the columns of the sum. I need to output the running total. for this, the field was re-displ...
Dweesil
Nov 16, 2023Copper Contributor
I am very curious how you would write the measures to do this with multiple categorical columns. In the above sample your row labels are the dates, but if you want a running total measure for each of two columns called "Sum of Value - GroupA" and "Sum of Value - GroupB".
I do not see grouping function within the calculate when you create the measure.
I do not see grouping function within the calculate when you create the measure.
SergeiBaklan
Nov 16, 2023Diamond Contributor
Instead of removing all filters with ALL() you may remove all but Group filter with ALLEXCEPT()
RTotal:=VAR
MaxDate=MAX ( Table1[Date] )
RETURN
CALCULATE( [Total],
Table1[Date]<= MaxDate,
ALLEXCEPT( Table1, Table1[Group] )
)