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
Doby42
Frequent Visitor

Top N filter is sorting whole number wrong

I'm confused as to why the "Top N" for the whole number field of yearnbr wouldn't pick the same order as sort order?  Any suggestions?
I worked around it by creating a rankx column for year, and then use that as the "by value".  But I don't think any work around should be nessary.

 

Annotation 2019-11-14 085932.png

1 ACCEPTED SOLUTION

Thanks for posting.  Looking at your pbix file I noticed that it was sum of year.  The issue is I'm using a date table that has far more than just year.  So my sum of yearnbr is causing the issue.  Being a leap year the total for 2016 is higher than 2017.

 

Once I changed from sum to max value the sort order was correct.  

 

 

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Doby42 ,

 

Based on my test, the TOPN Filter works fine on my side, could you please reproduce this issue in my shared sample pbix file?

 

6.PNG7.PNG

 


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for posting.  Looking at your pbix file I noticed that it was sum of year.  The issue is I'm using a date table that has far more than just year.  So my sum of yearnbr is causing the issue.  Being a leap year the total for 2016 is higher than 2017.

 

Once I changed from sum to max value the sort order was correct.  

 

 

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.