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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Month Sort Working in Table but not in Card

Good afternoon everyone, 
 
Hoping to get a little help here. As the title states, my month sort works perfectly fine in a Table, but is defaulting back to alphabetical in Card view. I am working on a custom KPI scorecard and need to be able to put the most recent month's value in a card. 
 
Month Name = SWITCH(Table_9572[Month], 1, "Jan", 2, "Feb", 3, "Mar", 4, "Apr", 5, "May", 6, "Jun", 7, "Jul", 8, "Aug", 9, "Sep", 10, "Oct", 11, "Nov", 12, "Dec")
 
Month Name is being sorted by the column "Month" and has worked as desired in the other report pages
Month = MONTH(Table_9572[RO Date Invoiced])
 
 
 data preview.PNG
   Table                                            Card
month sort table.PNGmonth sort card.PNG
1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

From your scenario, the card visual is sorted by unicode for text in power bi:

1.PNG

If you want to show Dec in card, you could refer to below measure:

Last Month name = CALCULATE(MAX('Table1'[Month Name]),FILTER('Table1','Table1'[Month]=MAXX('Table1','Table1'[Month])))

Result:

1.PNG

 

Regards,

Daniel He

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

View solution in original post

3 REPLIES 3
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

From your scenario, the card visual is sorted by unicode for text in power bi:

1.PNG

If you want to show Dec in card, you could refer to below measure:

Last Month name = CALCULATE(MAX('Table1'[Month Name]),FILTER('Table1','Table1'[Month]=MAXX('Table1','Table1'[Month])))

Result:

1.PNG

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Worked perfectly. Thank you so much!!!

parry2k
Super User
Super User

@Anonymous I believe at the aggregate function it doesn't use "sort by column". You can achieve the last month name by wiritng specific dax measure

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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