Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
14 | |
11 | |
5 | |
5 | |
3 |