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

Matrix with date in colum header - set to descending?

Hi,

 

matrix date in col header is driven by calculated calendar and works perfectly. Except the oldest date is on the far left and user has to scroll all the way to the right to see latest data.  All we want to do is set the date the other way around.. and prevent all this unnecessary scrolling.. 

 

We have tried multiple fixes that have been suggested but nothing we do works, like this one adding the index col  https://community.powerbi.com/t5/Desktop/Sort-Date-Column-in-Matrix/m-p/602217

 

It doesnt matter how the calendar is sorted in the data veiw, the matrix headers will not change.. 

 

Feels like a really stupid problem to have, any help appreciated

 

thanks

 

J

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1683018431335.png

vjianbolimsft_1-1683018460074.png

Please try:

First create a calendar table like this:

Calendar = 
var _a = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
var _b = MAX('Table'[Date])
return ADDCOLUMNS(_a,"ORDER",DATEDIFF([Date],_b,DAY))

vjianbolimsft_2-1683018530090.png

Then sort by column:

vjianbolimsft_3-1683018552302.png

Manage relationship:

vjianbolimsft_4-1683018571212.png

Final output:

vjianbolimsft_5-1683018587085.png

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1683018431335.png

vjianbolimsft_1-1683018460074.png

Please try:

First create a calendar table like this:

Calendar = 
var _a = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
var _b = MAX('Table'[Date])
return ADDCOLUMNS(_a,"ORDER",DATEDIFF([Date],_b,DAY))

vjianbolimsft_2-1683018530090.png

Then sort by column:

vjianbolimsft_3-1683018552302.png

Manage relationship:

vjianbolimsft_4-1683018571212.png

Final output:

vjianbolimsft_5-1683018587085.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Top Kudoed Authors