Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
E_K_
Helper III
Helper III

hh:mm data values not sorting high to low correctly - conversion

I have measures that calculate durations. Durations in minutes, and then converting that to hh:mm.

The measures are [Client Sev 1 Impact] and [Client Sev 2 Impact], both of which produce a whole number value 

My conversion measure is as below

 

Client Impact 1+2 duration (hh:mm) =

VAR Hours = [Client Sev 1 Impact] + [Client Sev 2 Impact]/ 60
VAR Minutes = MOD([Client Sev 1 Impact]+[Client Sev 2 Impact], 60)
RETURN
   FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")

 

When I put in a matrix visual (or whatever), these do not sort correctly./ Help? Probably the conversion measure I know, how can I tweak it so it sorts correctly

 

E_K__0-1747916465304.png

 

1 ACCEPTED SOLUTION
burakkaragoz
Community Champion
Community Champion

Hi @E_K_ ,

 

The issue here is that you're formatting the duration as a text string (hh:mm), and text values sort alphabetically — not numerically. That’s why the sorting looks off.

To fix this, you can do two things:

  1. Keep your current measure for display, so users still see the hh:mm format.
  2. Create a separate numeric measure (like total minutes) and use that for sorting.

Example:

Client Impact Total Minutes = 
[Client Sev 1 Impact] + [Client Sev 2 Impact]

Then in your matrix visual, sort the hh:mm column by this new numeric measure. That way, the visual looks right and sorts correctly.

Let me know if you need help setting up the sort in the visual.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI

View solution in original post

4 REPLIES 4
v-pgoloju
Community Support
Community Support

Hi @E_K_,

 

We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.

If the issue is resolved, we’d appreciate it if you could mark the helpful reply as Accepted Solution  it helps others who might face a similar issue.

 

Warm regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @E_K_,

 

We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.

If the issue is resolved, we’d appreciate it if you could mark the helpful reply as Accepted Solution  it helps others who might face a similar issue.

 

Warm regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @E_K_,

Thank you for reaching out to the Microsoft Fabric Forum Community.
And also Thanks to @burakkaragoz for Prompt and useful response.

 

Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful  this will benefit others in the community as well.

 

Best regards,

Prasanna Kumar

burakkaragoz
Community Champion
Community Champion

Hi @E_K_ ,

 

The issue here is that you're formatting the duration as a text string (hh:mm), and text values sort alphabetically — not numerically. That’s why the sorting looks off.

To fix this, you can do two things:

  1. Keep your current measure for display, so users still see the hh:mm format.
  2. Create a separate numeric measure (like total minutes) and use that for sorting.

Example:

Client Impact Total Minutes = 
[Client Sev 1 Impact] + [Client Sev 2 Impact]

Then in your matrix visual, sort the hh:mm column by this new numeric measure. That way, the visual looks right and sorts correctly.

Let me know if you need help setting up the sort in the visual.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors