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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Aydeedglz
Helper V
Helper V

Re-order graphic by date (month and year)

Hi, I have two graphics that I want to reorder but I don't have sucess 

 

This is the first one: The data in the table is by order but I don't see it in the graphic

Aydeedglz_0-1670536956207.png

Aydeedglz_1-1670537008161.png

 

The second one And the data is also sorted 

Aydeedglz_2-1670537065780.png

Aydeedglz_3-1670537097555.png

Aydeedglz_4-1670537111078.png

 

1 ACCEPTED SOLUTION
Aydeedglz
Helper V
Helper V

I solved it, if anyone needs it 

 

1.Create a column with DATE FORMAT and sorte it by date

2. Eliminate Hierarchy from the visual 

https://community.powerbi.com/t5/Desktop/How-to-remove-Date-Hierarchy/m-p/647894#M310625

 

And it is done, use it in your X-axis

View solution in original post

4 REPLIES 4
Aydeedglz
Helper V
Helper V

I solved it, if anyone needs it 

 

1.Create a column with DATE FORMAT and sorte it by date

2. Eliminate Hierarchy from the visual 

https://community.powerbi.com/t5/Desktop/How-to-remove-Date-Hierarchy/m-p/647894#M310625

 

And it is done, use it in your X-axis

v-tangjie-msft
Community Support
Community Support

Hi @Aydeedglz ,

 

According to your description, here are my steps you can follow as a solution.

(1)Click "Transform Data" to enter the Power Query editor, and click Add Index Column from 1.

Picture1.png

(2)Click "Close and Apply", go back to desktop, switch to "Data" view, click to sort columns, and select index columns.

Picture2.png

(3)Then the result is as follows.

vtangjiemsft_0-1670571192945.png

Please refer to the following document for more information.

Sort one column by another column in Power BI - Power BI | Microsoft Learn

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

danextian
Super User
Super User

Hi @Aydeedglz ,

 

You can create a custom column to sort the month and year column by

MoYr =
'Table'[Year] & FORMAT ( 'Table'[Month Number], "00" )

If you have a date column

MoYr =
 FORMAT ( 'Table'[Date], "YYYYMM" )

 

This will create a calculated column of YYYYMM format

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I am having trouble with the FORMAT function

Aydeedglz_0-1670864239050.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.