Forum Discussion
borniex
3 years agoFrequent Visitor
aggregate series
Hello, I want to aggregate series, I am attaching a picture of my idea, does anyone have an existing solution? Thanks for your help!! 🙂
- 3 years ago
Hi, borniex
You can try the following methods.
Column:
previous part = CALCULATE(MAX('Table'[part]),FILTER('Table',[id]=EARLIER('Table'[id])-1))judgement = IF([part]=[previous part],1,0)//Determine if the part is the same as the previous idFirst part = IF([judgement]=0,1,0)Max ID = CALCULATE(Max('Table'[id]),FILTER('Table',[id]<=EARLIER('Table'[id])&&[First part]=1))Sum value = CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Max ID]))Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
3 years agoCommunity Support
Hi, borniex
You can try the following methods.
Column:
previous part = CALCULATE(MAX('Table'[part]),FILTER('Table',[id]=EARLIER('Table'[id])-1))
judgement = IF([part]=[previous part],1,0)//Determine if the part is the same as the previous idFirst part = IF([judgement]=0,1,0)Max ID = CALCULATE(Max('Table'[id]),FILTER('Table',[id]<=EARLIER('Table'[id])&&[First part]=1))Sum value = CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Max ID]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
borniex
3 years agoFrequent Visitor
Thank you very much, I was interested in this solution! Elegant, I thought more complicated 😄