cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sdhn
Responsive Resident
Responsive Resident

Sort by Month without date column

Hi All,

 

I have a table with the column called Month,   values are as:  Jan, Feb, Mar ...  Dec. 

I need to sort graph by Month. 

 

Graph is made up of  Revenue and Month.

 

Your help will be appreciated. 

There is not date column in the table.   Thanks 

 

 

 

2 ACCEPTED SOLUTIONS
hmahesh94
Helper I
Helper I

Hi @sdhn 

You can still sort by month by creating a 'Month Number' Index Column and sort the Month Column within the table using the 'Month Number' column. 

If the existing table has many rows, it may affect the speed with a new column created, so if that is the case I would suggest you to create a new table and establish a relationship between the two.

Hope this helps! If you need any clarification, feel free to reply.

 

Please Accept this as a solution if you think I answerd your question.

Thanks

Mahesh 

 

View solution in original post

sdhn
Responsive Resident
Responsive Resident

Solution:   

We completed the following steps: 

  1. Created Month table that holds IDs for each month. 
  2. Created calculated column in the original table holding the IDs of the second table:
    MonthNumberOfYear= RELATED(Reference[Month #])
    sdhn_0-1637679667634.png

     

  3. Sorted calculated column:
    sdhn_1-1637679667640.png

     

  4. Sorted month based on calculated column:
    sdhn_2-1637679667644.png

     

  5. Refreshed visuals and confirmed changes. 

View solution in original post

7 REPLIES 7
sdhn
Responsive Resident
Responsive Resident

Solution:   

We completed the following steps: 

  1. Created Month table that holds IDs for each month. 
  2. Created calculated column in the original table holding the IDs of the second table:
    MonthNumberOfYear= RELATED(Reference[Month #])
    sdhn_0-1637679667634.png

     

  3. Sorted calculated column:
    sdhn_1-1637679667640.png

     

  4. Sorted month based on calculated column:
    sdhn_2-1637679667644.png

     

  5. Refreshed visuals and confirmed changes. 
sdhn
Responsive Resident
Responsive Resident

Hi Mahesh ,

 

I tried did not work as below.

 

1) I created a table sort . 

sdhn_1-1637174948070.png

 

 I uploaded this table onto current report.

 

But currrent existing table has multiple rows for Feburay, March, April & May.  No other Months as below:

sample data

sdhn_2-1637175136976.pngsdhn_3-1637175175516.pngsdhn_4-1637175206833.png

 

 

I added Month # in the existing table.  

Sample data 

 

sdhn_5-1637176104343.png

 

sdhn_6-1637176134948.pngsdhn_7-1637176158723.pngsdhn_8-1637176183446.png

 

 

here is the relationship

 

sdhn_9-1637176252944.png

 

 

But not getting graphs correctly still.  Am I missing some thing?  Thanks 

 

 

 

 

 

Did you set the Month column to sort by the Month# column?

sdhn
Responsive Resident
Responsive Resident

No

v-jingzhang
Community Support
Community Support

Hi @sdhn 

 

Have you solved this problem? After sorting Month column by Month# column, it should work. Sort one column by another column in Power BI Desktop

 

Best Regards,
Community Support Team _ Jing

sdhn
Responsive Resident
Responsive Resident

see below 

hmahesh94
Helper I
Helper I

Hi @sdhn 

You can still sort by month by creating a 'Month Number' Index Column and sort the Month Column within the table using the 'Month Number' column. 

If the existing table has many rows, it may affect the speed with a new column created, so if that is the case I would suggest you to create a new table and establish a relationship between the two.

Hope this helps! If you need any clarification, feel free to reply.

 

Please Accept this as a solution if you think I answerd your question.

Thanks

Mahesh 

 

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors