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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Re-ordering the x-axis values

Hi ,

 

I have a table with multiple values for duration, starttime, timestamp etc parsed from a server's log. And I wanted to display a count of projectID and an average of Duration at every hour. SO i extracted day of week and hour from date and time respectively and created a custom column with the following query

Timeline = [WW] & "." & [Day of Week] & "." & [StartHour]. The column is in Text datatype 

 

But when i tried plotting the graph with Timeline as x-axis the order is very different

Capture.PNG

Please notice how the hour is being sorted by only the first digit.

I went on and added a prefix of 0 to hour but that also didnt change the order.

What i wanted it 40.0.0,40.0.1,40.0.2,40.0.3 etc.

Anyhelp is appreciated. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, 

 

@TomMartens Thanks for you reply

 

I sorted it by adding a zero to the last digit that is 40.0.00, 40,0.01.

 

 

Regards,

Aish

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey,

 

the order of values on the x-axis can be changed by defining an index column and using this index column to sort the order of values.

 

In the picture below I marked the column "Month Name", then I choose "Sort by Column" from the Modeling menu and  selected the column Month No (the index column)

 

Sort Column by - 02.png

 

By creating the Index column you have to be aware that the value "40.0.0" may occur multiple times in your table, due to the different years. Each occurence must have the same index value.

 

Hopefully this gets you started

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi, 

 

@TomMartens Thanks for you reply

 

I sorted it by adding a zero to the last digit that is 40.0.00, 40,0.01.

 

 

Regards,

Aish

Hi @Anonymous,

 

Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread? Smiley Happy

 

Regards

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors