This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have created a calculated column that gives me a Time Duration in Days, Hours, Minutes, Seconds. What I would like to do now is be able to sort the column in my table visual, but it is not putting it in the correct order. Please see the attached image. Can someone tell me how to be able to sort by this column? Thank you for your assistance!
Solved! Go to Solution.
I solved my problem by fixing the formatting of the Value. I added a second "0" to the day portion of the following code and it worked.
FORMAT(dayNo,"#00")&" day "&FORMAT(hourNo,"#00")&":"&FORMAT(minuteNO,"#00")&":"&FORMAT(secondNo,"#00")
Hi @Rebender,
Please create calculated columns.
Final rank =
RANKX (
Dataset2,
(
RANKX ( Dataset2, LEFT ( Dataset2[Duration], 2 ),, ASC )
+ DIVIDE (
RANKX ( Dataset2, RIGHT ( Dataset2[Duration], 8 ),, ASC ),
COUNTROWS ( Dataset2 ) + 1
)
),
,
ASC,
DENSE
)
Best regards,
Yuliana Gu
Thank you for your quick response, but that did not work. It still sorted it in the same order. If you notice in the picture, it is going from 1 day, 11 day, 12, 2 day. I need it to go 1 day, 2 day, 11 day, 12 day. Would it be better if I used the mintes column that I used to format my duration in the Final Rank column instead???
I solved my problem by fixing the formatting of the Value. I added a second "0" to the day portion of the following code and it worked.
FORMAT(dayNo,"#00")&" day "&FORMAT(hourNo,"#00")&":"&FORMAT(minuteNO,"#00")&":"&FORMAT(secondNo,"#00")
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 63 | |
| 35 | |
| 34 | |
| 24 | |
| 23 |