Forum Discussion
Anonymous
3 years agoNot applicable
Spend Buckets
Hi All, I wanted to create spend buckets for spend by Name. However, I do not want to categorize the bucket by each line instead it will read total spend then it classifies which bucket it falls ...
- 3 years ago
Hi,
Here is one way to do this:Bucket = var _sum = SUM('Table (32)'[Spend]) return
SWITCH(TRUE(),_sum<50,"Less than 50",_sum<100,"More than 50",_sum>=100,"More than 100")
When placed in a table the result is like this:
If you want a column here is an example of that:
Bucket_c = var _sum = CALCULATE(SUM('Table (32)'[Spend]),ALLEXCEPT('Table (32)','Table (32)'[Name])) return
SWITCH(TRUE(),_sum<50,"Less than 50",_sum<100,"More than 50",_sum>=100,"More than 100")
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
ValtteriN
3 years agoCommunity Champion
Hi,
Here is one way to do this:
Bucket = var _sum = SUM('Table (32)'[Spend]) return
SWITCH(TRUE(),
_sum<50,"Less than 50",
_sum<100,"More than 50",
_sum>=100,"More than 100")
When placed in a table the result is like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
When placed in a table the result is like this:
If you want a column here is an example of that:
Bucket_c = var _sum = CALCULATE(SUM('Table (32)'[Spend]),ALLEXCEPT('Table (32)','Table (32)'[Name])) return
SWITCH(TRUE(),
_sum<50,"Less than 50",
_sum<100,"More than 50",
_sum>=100,"More than 100")
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
- Anonymous3 years agoNot applicable