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

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.

Reply
Anonymous
Not applicable

Calculated whole number doesnt sort correctly in matrix

Hi,

 

I have a calculated column with the dax expression and the whole number data type

 

 

 

Days Past = DATEDIFF(INVOICE[PAYMENT_DUE_DATE],TODAY(),day)

 

 

 

If I set this as the first row header in a matrix and click the down arrow to sort it shows

 

66

62

6

5

4

37

35

 

Instead of sort it by number values ...any ideas?

 

Thanks

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample and can't reproduce your problem.

vkalyjmsft_0-1657702923426.png

Please try to sort the Days Past column by the PAYMENT_DUE_DATE column. Click the Days Past column > Sort by column > PAYMENT_DUE_DATE.

vkalyjmsft_1-1657703057972.png

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample and can't reproduce your problem.

vkalyjmsft_0-1657702923426.png

Please try to sort the Days Past column by the PAYMENT_DUE_DATE column. Click the Days Past column > Sort by column > PAYMENT_DUE_DATE.

vkalyjmsft_1-1657703057972.png

Best Regards,
Community Support Team _ kalyj

If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , Make sure the data type and format both are the whole numbers.

 

You can sort on row/Measure. Column will sort based on the sort order of column used

Anonymous
Not applicable

Hi @amitchandak ,

 

Both are set as whole number and is a in the matrix as a ROW?

 

Capture.PNG

 

TIA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.