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
harib
Post Patron
Post Patron

Sort MonthName + Year for Multiple year

 

Hi ,

 

 I have a requirement where I need show data like Month_name + Years in Assending/Desending , Lets say i have a Year and Month_name for 2017 to 2019. Each year having Jan to Dec, I would like to show all the Month_name + Years in Assending/Desending order.  This way i need to show in chart ( Jan-2017, Feb-2017...., Dec-2017, Jan-2018, Feb-2018...., Dec-2018,Jan-2019, Feb-2019...., Dec-2019). I have tried but it's coming like belwo image 

Capture.PNG

 

Thanks in Advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@harib 

 

If you want dynamic, you can format your date in new column (as I suggested previous) or new table (as lc_finance suggested). Sorting by custom format date "yyyy.MM.00" sort first in year, next month. All is dynamic and new dates goes to the right place between values.

 

Regards

View solution in original post

4 REPLIES 4
lc_finance
Solution Sage
Solution Sage

Hi @harib ,

 

you can do the following:

 

1) create a new table by clicking on Home -> Enter Data

2) enter the following table:

Enter table.PNG

 

3) create a relationship between the new table and your existing table

create relationship.PNG

4) Order the new date column based on the new order column: click on the new Date column; then click on Modeling -> Sort by Column -> Order

Order.png

5) in your visualization, replace the 'Date' column from your existing table with the 'Date' column from the new table

 

Regards,

 

LC

www.finance-bi.com

@lc_finance 

 

In this senario we are giving static date values.Tomorrow if date added in DB level we will get issue here. Please let me know any other option in this case.

Anonymous
Not applicable

@harib 

 

If you want dynamic, you can format your date in new column (as I suggested previous) or new table (as lc_finance suggested). Sorting by custom format date "yyyy.MM.00" sort first in year, next month. All is dynamic and new dates goes to the right place between values.

 

Regards

Anonymous
Not applicable

In visuals you can sort only by column which you use in visuals. You can add column to Tooltip, and then sort by them (at the end hide it).

Sort work only for one column, so prepare column with date in format yyyy.MM.00. Day values overwrite by 00 to clear them.

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.