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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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