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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
srivatsan34
Frequent Visitor

Re arraging existing columns in chart

BI Issue.JPG

 

I am currently using Power BI desktop trial version and when visualising bard charts using excel data, i am unable to re arrange the x-axis in oorder of 10 9 8 7 5. Is it possible to re arrange it in trial version or do we need access to the full version to modify the chart.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @srivatsan34,

 

 

What is happening is that the column that you are using for the axis is formatted as text so when you added it to your chart it will give you 10, 5, 7, 8, 9 you need to format the column to number and chose the sort order to Z-A and it will be in the correct format

 

Order.png

 

 

Regards

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @srivatsan34,

 

 

What is happening is that the column that you are using for the axis is formatted as text so when you added it to your chart it will give you 10, 5, 7, 8, 9 you need to format the column to number and chose the sort order to Z-A and it will be in the correct format

 

Order.png

 

 

Regards

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix Thank you for your help. What if the column i currently use contains both text and values? So do i need to duplicate this coloumn and format one columna as text and the other column as number?

Hi @srivatsan34,

 

Add a new column with the following code:

 

Sort_Order =
IF (
    NOT ( ISERROR ( 'Table'[Column] + 0 ) )
        = TRUE ();
    CONCATENATE ( REPT ( 0; 4 - LEN ( 'Table'[Column] ) ); 'Table'[Column] );
    'Table'[Column]
)

 

This will convert all your number to 0 added format 10 will become 0010

 

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.