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.
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
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |