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
antonaccidavide
New Member

Reordering the hourly columns of the chart according to a personal order

Good morning everyone,
something that will probably be simple for many, but for me it is not.

I need to rearrange the order of the hourly columns of the graph according to a personal order, that is, given the 24 hours, I need to have an hourly graph that starts from 6pm and ends at 8am

I actually managed to reorder it via custom reorder columns, but then I don't have a correct reference in the X axis

This is a chart I created with python, again through power bi and it is as I would like it but using the standard power bi charts

antonaccidavide_0-1715256162794.png



antonaccidavide_1-1715256252364.png

This is how the Power BI chart appears to me, where I created a column that I used to reorder the columns, but I don't have a correct header on the X axis

How can I solve it?

2 REPLIES 2
v-xuxinyi-msft
Community Support
Community Support

Hi @antonaccidavide 

 

I’d like to acknowledge the valuable input provided by the @Greg_Deckler . His initial idea was instrumental in guiding my approach. Here is the specific testing I did about "Sort By column" for your referrence:

 

My sample:

vxuxinyimsft_6-1715310348129.png

 

1. Create a order table as follow

vxuxinyimsft_0-1715309534355.png

 

2. Merge two tables

vxuxinyimsft_3-1715309654005.png

 

3. Expand the table

vxuxinyimsft_2-1715309632392.png

Close & Apply

 

4. Select the Time column and Sort By column

vxuxinyimsft_4-1715309868289.png

 

Output:

vxuxinyimsft_5-1715310264536.png

 

If this sample data is structurally different from the one you are using, please do not hesitate to mention it and I will modify it.

 

Best Regards,
Yulia Xu

 

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

Greg_Deckler
Super User
Super User

@antonaccidavide Use a Sort By column on your original column of your correctly ordered column. Or you could just change the x-axis label


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.