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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.