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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Displayed table does not display the months in proper order

I am running some MDX against a cube to retrieve a table of some insurance information. Everything seems to be fine expect for the fact that when I try to make a report with the retrieved table, the months are displayed by the alphabetical order. When I select the three time related fields of Year, Quarter, and Month on the report side, I am unable to sort by column. I then tried the "Model" selection, select "Month" , and sort it by another time related field such as "Year", it still does not work. I tried to add an ID column, post retrieving the table so that I could use the ID as a sorting order for the Months, but I couldn't do it. The table being read into Power BI as it is is perfect and I just want to display it as it is. Any help is appreciated. Thanks!

The Table as it is - this is perfect
Capture.JPG

This is how the table looks like on the report plane. The months are in the wrong order

 

Capture2.JPG

 

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to add a column with month number and then select the Sort By on the modelling tab for the month name and select the Month number as the sort base should work as expected.

 

Check the documentation on this link.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix Thanks! I was able to figure this one out after some experimenting. At the point of importing the MDX query table into Power BI, I used Power Query to add an index column to the imported table and used that to sort the months. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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