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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
danialsj
Frequent Visitor

Month Sort by Column not working with Top N

I want to create some visuals that only display data from the latest month. I am currently using Top N which helped me last month (September) but I realized it was only giving me September data because 'S' is alphabetically last. 

 

Things I have already done:

  • Created an index for the date table and sorted the column by index
  • Created a relationship between the date table and the fact table
  • Changed the index to 'Whole Number'

 

Data:

Fact Table

ID         Score    Month    

1001     78         September

1002     89         February

1003     09         October

 

Month (Lookup Table)

Index    Month

1           January

2           February

3           March

4           April

.........cont.

 

 

 

1 REPLY 1
nandukrishnavs
Community Champion
Community Champion

Hi @danialsj,

Try to create a conditional column in the Fact table using Edit query mode. That can be an index value or corresponding date field. 

Under the Modelling tab, you can change the sort order (choose newly created conditional column). 

 

If you are creating a date field, you can filter the visual using Top N and select By value as "Latest Date".

 

Regards,

Nandu Krishna


Regards,
Nandu Krishna

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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