Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
Am in need of assistance....I have a query returning "Elapsed minutes" as Whole Number data type. I created a new column, within PowerBI, which "categorizes" the value into "buckets of time". This created column is set up as:
Solved! Go to Solution.
First thing to do is create a reference table with your desired buckets and another column indicating the sort order.
Then you can sort the bucket name by the bucket ID
Note: You can slightly simplify your formula
Time_Slot = SWITCH(TRUE()
,Mobile_Visit_Detail[Elapsed Time]<=10,"0-10"
,Mobile_Visit_Detail[Elapsed Time]<=15,"10-15"
,Mobile_Visit_Detail[Elapsed Time]<=30,"15-30"
,Mobile_Visit_Detail[Elapsed Time]<=60,"30-60"
,Mobile_Visit_Detail[Elapsed Time]<=180,"60-180"
,Mobile_Visit_Detail[Elapsed Time]<=360,"180-360"
,Mobile_Visit_Detail[Elapsed Time]<=540,"360-540"
,Mobile_Visit_Detail[Elapsed Time]<=720,"540-720"
,"720 +")
Thank you. However, the sorting is still not as intended.
I created the table as such:
The reference table is "MVTimeSlots" with column "TimeSlot". It is on the Axis.
The Values is from the data table: "Count of Time_Slot".
check that your visual is actually sorted by the X axis field.
It looks to be sorted by the X axis.
Did you set the TimeSlot column to be sorted by the ID column?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
7 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
6 | |
5 | |
3 | |
3 | |
2 |