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
fb198
Regular Visitor

Month name not sorting correctly despite Sorting by another column

Hi, 

 

I have a column in my Calendar Table with values like 'Jan 2024', 'Feb 2024', 'Mar 2024' and so on. I have sorted with a Custom Index called Sort_Index. Despite Sorting it by another column. It sorts correctly in table or visual chart. However, when I use a card at report level to get the month of reporting selected, The 'First' value is shown as April.

 

Every other post I have found dealing with this issue had had answers about the 'sort-by-column' feature. However, as you can see I've already applied that, but seem to recieve the same results. fb198_2-1724156576192.png

Values of  MonYear and Sort_IndexValues of MonYear and Sort_Index

 

 

fb198_1-1724156487081.png

 

 

Any help to work with/around this is highly appreciated. 

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @fb198 - as per my understanding card visual doesn't respect the custom sort order applied to your month column. Even though you've already sorted your MonYear column using the Sort_Index column, the card visual might still be picking the first value alphabetically instead of following the custom sort order.

create a measure to get the card visual as per monthname order instead of alphabitical 

 

Selected Month =
CALCULATE(
    FIRSTNONBLANK('DateTab'[MonthYear], 1),
    FILTER(
        'Datetab',
        'DateTab'[MonthNumber] = MINX(ALL('Datetab'), 'DateTab'[MonthNumber])
    )
)
 
In above measure i have month number to sort it , in your case you can change it to sortindex column or monthnumber also fine.
 
Hope it works.

 

rajendraongole1_0-1724158783938.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @fb198 - as per my understanding card visual doesn't respect the custom sort order applied to your month column. Even though you've already sorted your MonYear column using the Sort_Index column, the card visual might still be picking the first value alphabetically instead of following the custom sort order.

create a measure to get the card visual as per monthname order instead of alphabitical 

 

Selected Month =
CALCULATE(
    FIRSTNONBLANK('DateTab'[MonthYear], 1),
    FILTER(
        'Datetab',
        'DateTab'[MonthNumber] = MINX(ALL('Datetab'), 'DateTab'[MonthNumber])
    )
)
 
In above measure i have month number to sort it , in your case you can change it to sortindex column or monthnumber also fine.
 
Hope it works.

 

rajendraongole1_0-1724158783938.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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