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
fbjras12
New Member

Months in the wrong order

I made a spreadsheet with 3 tables. One of them relates Months, Results and goals. Only in the panel months are appearing in the wrong order. I would like it to appear in the order of the annual calendar. If anyone can help me I'll be grateful.

 

Panel Link: https://drive.google.com/drive/folders/0B1b9zTy_CQcRVmNjWjh0bURidlE

Link of source tables:https://drive.google.com/drive/folders/0B1b9zTy_CQcRVmNjWjh0bURidlE

8 REPLIES 8
Phil_Seamark
Employee
Employee

Hi @fbjras12,

 

The default sort order for text columns is alphabetically so I'm guessing your months are sorting this way?

 

To fix you'll need another column to control the sort order.  Preferablly using a numeric format.

 

I always add this column to my Date/Calendar tabales

 

MonthID = INT(FORMAT('Dates'[Date],"YYYYMM"))

And use this option on my Month column to tell it to sorth by the MonthID column.

 

SortByColumn.png

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

@fbjras12

Try this in the Query Editor:

Table.AddColumn(<YOURLASTSTEP>, "YYYYMM", each "2017."&Number.ToText([Mes]))

I do not master this system. Please if you can pass me by what exactly I should write! Based on the name of my table, in the name of my date column, because I am not able to apply the formula.

 

THIS APPEAR: https://drive.google.com/file/d/0B1b9zTy_CQcRYkdXV29heUhRakU/view?usp=sharing 

Anonymous
Not applicable

I would suggest you to create the column in "GetData" aka PowerQuery and not in the DAX formula Bar.

My formula won't work in DAX as it is a Power Query formula.

 

If you have problems, I can create a gif for you.

I did a spreadsheet with some tables. One of them relates month, result and goal. I have ordered the months in abbreviated form (JAN, FEB, etc.). But the panels do not accept the fixed order of the annual calendar. What appears is: February, January, April, August ... Can anyone help me? I'll attach the panel image and the data source worksheet. My idiom on the spreadsheet is portuguese.

 

Dashboard= https://drive.google.com/drive/folders/0B1b9zTy_CQcRVmNjWjh0bURidlE

WorkSheet: https://drive.google.com/drive/folders/0B1b9zTy_CQcRVmNjWjh0bURidlE

Anonymous
Not applicable

or better:

 

=Table.AddColumn(<YOURLASTSTEP>, "YYYYMM", each Number.FromText("2017")*1000+[Mes])

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.