Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.