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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
newgirl
Post Patron
Post Patron

Sorting Row Header According to Date

Hi!

 

I have in my report a matrix table showing the "Employee Name" as Rows and "Type of Expense" as Columns.

This needs to be sorted in a descending order to know the top employees incurring expenses so I clicked the "Total" column to be sorted accordingly.

 

However, our boss asked us if it's possible as well to sort the months starting January. Is this possible? If I have to assign numerical values with the months (Ex. 1 as January, 2 as February and so on...), how will this work?

 

Hope you can help me!

 

 

Thank you

DK

 

Sorting.JPG

5 REPLIES 5
Anonymous
Not applicable

Yes, you were right.
Add a column with a numeric index to you months (so jan is 1, feb is 2 etc). Then in Table view click on your column, go to Modeling and click on "Sort on column" (not sure how it's in English, somewhat similar to this). Then choose the column with numbers.

Hi! 

I tried to do your steps. I added a new column and used =MONTH to get the numerical value for the date. I tried to insert this new column in the Rows but now the numbers are all being repeated.

 

Also, if I click the matrix and try to click the "Sort by Column", it's greyed out.

 

Do you other ideas?

 

sort 2.JPG

Anonymous
Not applicable

No, you don't have to do it in the visual but in the table view. image.png

Hi!

 

I read again your initial response. I opened the Data view, and added a new column representing 1 = Jan, 2 = Feb, and so on.... I sorted this column under Modelling Tab.

 

Going back to the Report view, I replaced the "Months" column with the new column.

However, this new column is still not being ordered in an ascending order.

 

Hope you have other ideas!

 

 

table 1.JPG

 

table 2.JPG

 

Anonymous
Not applicable

Two things

- your data is clearly still sorted on the amount, so clicks on the three dots and sort on month

BUT ALSO
- you don't have to use now the "number of month" column, just keep the original Month (Jan, Feb etc.)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.