Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have this table:
| Name | Code | Quantity |
| 10 | 5 | |
| 10 | 10 | |
| 44 | 10 | |
| 10 | 50 |
And I need to create 2 measures, bucket and Count of bucket
| Code | Bucket | Count |
| 10 | 1-10 | 2 |
| 10 | 11-20 | 1 |
| 10 | 21+ | 1 |
I have this , but how do I combine it with a virtual table
var countqty = count(qty)
var buckets = SWITCH(TRUE(),
countqty>0&&countqty<11,"1-10",
countqty>11&&countqty21,"11-20")
please provide the expected output, thanks.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!