Forum Discussion
Anonymous
2 years agoNot applicable
summarize switch statement ?
I would like to a create switch statement or any other measure that summarizes the "percentage of booked" column in the table below and tells me the number of times an item falls within the range I have specified in the switch statement. Below is an exampl of the ranges i have specified. my desired output would show me 3 items were less than 70%, 3 items were between 70 and 80 percent and one item was between 80 and 90 percent
| Item | Open Orders | Total Booked | Percentage of Booked |
| book | 78 | 100 | 78% |
| toy | 49 | 100 | 49% |
| hat | 69 | 120 | 58% |
| cup | 79 | 110 | 72% |
| bill | 19 | 90 | 21% |
| paper | 68 | 80 | 85% |
| laptop | 74 | 100 | 74% |
Power BI does not provide dynamic bucketing, you need to bring your own buckets.
see attached.