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
This is a custom measure that is converting a whole number that represents minutes into mins, hrs and days but is not sorting how I would expect. Mins > Hrs > Days or vice versa.
Any suggestios?
Solved! Go to Solution.
Hi,
You can get the expected order using the reference table.
1. Create one table like below. You can use "Enter Data" option to create this static table.
2. Create one column in your main table in Power query layer. change it for your table column
= Table.AddColumn(#"Changed Type", "Type", each if Text.Contains([TTF], "mins") then "mins" else if Text.Contains([TTF], "days") then "days" else if Text.Contains([TTF], "hrs") then "hrs" else 0)
3. Connect table in step 1 and step 2 using the Type column
4. Create one calculated column in you main table using -
5. Select your main column and choose sort by column and select order.
Thanks
Hari
Hi,
You can get the expected order using the reference table.
1. Create one table like below. You can use "Enter Data" option to create this static table.
2. Create one column in your main table in Power query layer. change it for your table column
= Table.AddColumn(#"Changed Type", "Type", each if Text.Contains([TTF], "mins") then "mins" else if Text.Contains([TTF], "days") then "days" else if Text.Contains([TTF], "hrs") then "hrs" else 0)
3. Connect table in step 1 and step 2 using the Type column
4. Create one calculated column in you main table using -
5. Select your main column and choose sort by column and select order.
Thanks
Hari
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!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |