Forum Discussion
Anonymous
3 years agoNot applicable
Priority buckets including previous bucket
Hi All,
I'm trying to create the following buckets/bins for the data below:
Buckets/bins:
| Buckets/Bins | Includes |
| 5 only | 5 only |
| 4 and above | 4 and 5 |
| 3 and above | 3, 4 and 5 |
| 2 and above | 2, 3, 4 and 5 |
| All | 1, 2, 3, 4 and 5 |
Data:
| Item Number | Cost | Priority |
| A | 10 | 1 |
| B | 20 | 3 |
| C | 30 | 4 |
| D | 10 | 2 |
| E | 20 | 3 |
| F | 40 | 5 |
| G | 20 | 3 |
| H | 10 | 5 |
| I | 5 | 2 |
I want the output to look like below:
| Buckets | Number of Items | Total Cost |
5 only | 2 | 50 |
| 4 and above | 3 | 80 |
| 3 and above | 6 | 140 |
| 2 and above | 8 | 155 |
| All | 9 | 165 |
Could someone please help with how to get to this result. Thanks!
Hi,
Please find attached the PBI file.
Hope this helps.
2 Replies
- amitchandak
Super User
Anonymous , These are not mutually exclusive. So better to create a measure then create a calculation groups
More than 1 = calculate(Sum(Table[Cost]), filter(Table, Table[priority]>=1) )
More than 2 = calculate(Sum(Table[Cost]), filter(Table, Table[priority]>=2) )
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0
- Ashish_Mathur
Super User