Forum Discussion
Cumulative Sum by Group Issue
- Anonymous3 years ago
Hi GeeWhiz7 ,
I have created a simple sample, please refer to it to see if it helps you.
Create a column.
PBI Run Total = CALCULATE(SUM(Manufacturing[Rate]),FILTER(Manufacturing,Manufacturing[ID]=EARLIER(Manufacturing[ID])&&Manufacturing[Date]<=EARLIER(Manufacturing[Date])))Or a measure.
Measure = CALCULATE(SUM(Manufacturing[Rate]),FILTER(ALL(Manufacturing),Manufacturing[ID]=SELECTEDVALUE(Manufacturing[ID])&&Manufacturing[Date]<=SELECTEDVALUE(Manufacturing[Date])))If I have misunderstood your meaning, please provide your desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi GeeWhiz7 ,
I have created a simple sample, please refer to it to see if it helps you.
Create a column.
PBI Run Total =
CALCULATE(SUM(Manufacturing[Rate]),FILTER(Manufacturing,Manufacturing[ID]=EARLIER(Manufacturing[ID])&&Manufacturing[Date]<=EARLIER(Manufacturing[Date])))
Or a measure.
Measure =
CALCULATE(SUM(Manufacturing[Rate]),FILTER(ALL(Manufacturing),Manufacturing[ID]=SELECTEDVALUE(Manufacturing[ID])&&Manufacturing[Date]<=SELECTEDVALUE(Manufacturing[Date])))
If I have misunderstood your meaning, please provide your desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- GeeWhiz73 years agoRegular Visitor
Thank you to each person providing a solution as it helps me better understand the syntax. I think the easiest one for me to use was the v-polly-msft solution mainly because it is explicit in what it is filtering (manufacturing ID and date columns) but now I understand how to make each work.