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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
PowerBINoob12
Helper I
Helper I

Sorting year and month on a graph

Hi,

 

I'm having immense trouble getting a graph to show the last 6 calendar months in order of the correct month.

Here is what i have on my Calendar table:

PowerBINoob12_0-1677773461798.png


[Sort] is a combination of the year and month Jan2022 being 202201, feb 2022 being 202202 etc. I am then sorting it by this value ([sort]) on the table.

Then when I add [sort order] to a graph it has december in the incorrect position on both graphs:

PowerBINoob12_1-1677773623853.png

Am I correct to think that if the table is sorted by [sort] the then [sort order] should sort in this order on the graphs?

 

Can anyone help me please?

additional pic that shows the value in dec2022 is less than Jan2023: 

PowerBINoob12_2-1677773802207.png

 

1 ACCEPTED SOLUTION
PowerBINoob12
Helper I
Helper I

I figured it out in the end.

 

I needed to select the column I wanted to sort before I click "sort by column". I had just assumed clicing sort by column would do the whole table 🙂

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Hello.

In the CALENDAR table you select the MONTH column LETTER

Then, at the top, you choose SORT BY COLUMN and there you choose the column MONTH NRO

And you're done

You tell me xfa

PowerBINoob12
Helper I
Helper I

I figured it out in the end.

 

I needed to select the column I wanted to sort before I click "sort by column". I had just assumed clicing sort by column would do the whole table 🙂

AmiraBedh
Super User
Super User

What is the type of the Sort combination column ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Hi Thanks for your reply and help.

It was set to text but i've just changed it to whole number - but still the same issue on the graphs.

PowerBINoob12_0-1677774437416.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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