Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
I've been trying to wrap my head around this... I have a Power BI matrix visual where I want to show Day Name has column headers, Hour by rows and Total Revenue by values. However, trying to re-arange the Day Name to start on Monday seems a little mind-boggling. Here's the DAX code I've been using:
But, my matrix looks like this...
I want my column headers to be arranged so that it starts from Monday. Please help.
Thank you.
Solved! Go to Solution.
To sort Matrix visualizations (and slicers) we need to use the "Sort by column” feature to sort our original (display) column, by another (index) column. Modify your table to include an index column like this:
Date = ADDCOLUMNS(
CALENDAR(DATE(2023,1,1),DATE(2023,12,31)),
"Year",YEAR([Date]),
"QuarterNr",QUARTER([Date]),
"Quarter",FORMAT([Date],"\QQ"),
"MonthNr",MONTH([Date]),
"Month",FORMAT([Date],"MM"),
"DayNr",WEEKDAY([Date],2),
"Day",FORMAT([Date],"DDDD"),
"DayIndex",IF(FORMAT([Date],"w")="1","7",FORMAT(WEEKDAY([Date])-1,"####"))
)
Then selecting the “Day” column, going to “Column tools” in the ribbon, and selecting the “Sort by column” button, then under that menu selecing “DayIndex”/whatever column you want to sort the display column by.
Hope this helps.
To sort Matrix visualizations (and slicers) we need to use the "Sort by column” feature to sort our original (display) column, by another (index) column. Modify your table to include an index column like this:
Date = ADDCOLUMNS(
CALENDAR(DATE(2023,1,1),DATE(2023,12,31)),
"Year",YEAR([Date]),
"QuarterNr",QUARTER([Date]),
"Quarter",FORMAT([Date],"\QQ"),
"MonthNr",MONTH([Date]),
"Month",FORMAT([Date],"MM"),
"DayNr",WEEKDAY([Date],2),
"Day",FORMAT([Date],"DDDD"),
"DayIndex",IF(FORMAT([Date],"w")="1","7",FORMAT(WEEKDAY([Date])-1,"####"))
)
Then selecting the “Day” column, going to “Column tools” in the ribbon, and selecting the “Sort by column” button, then under that menu selecing “DayIndex”/whatever column you want to sort the display column by.
Hope this helps.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.