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
Matija258
Frequent Visitor

How to reallocate stacks in a column chart?

Hi.

Untitled1.png

 

 

 

The numbers on x axis are supposed to represent the number of a month. The text type of months is text and I was wondering if there is a way to reallocate each stack so that their sequence is correct.

 

Thank you in advance!

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Matija258,

 

Based on my understanding, the data type of those values (1,10,11,12, etc) displayed on X-axis is text, right? If so, could you change it to whole number? After changing data type, the sort of these values will be 1,2,3...etc.

 

If you don't want to change data type and still use this column in chart, please try below workaround.

 

In Query Editor mode, add a custom column. In my test, it's named as [Index column], remember to set its data type to whole number.

1.PNG

 

Then, in data view, select [month column], change the "Sort by" option from default to [Index column]

2.PNG

 

Now, when you add [month column] into axis area, its sequence will be 1,2,3....etc

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Matija258,

 

Based on my understanding, the data type of those values (1,10,11,12, etc) displayed on X-axis is text, right? If so, could you change it to whole number? After changing data type, the sort of these values will be 1,2,3...etc.

 

If you don't want to change data type and still use this column in chart, please try below workaround.

 

In Query Editor mode, add a custom column. In my test, it's named as [Index column], remember to set its data type to whole number.

1.PNG

 

Then, in data view, select [month column], change the "Sort by" option from default to [Index column]

2.PNG

 

Now, when you add [month column] into axis area, its sequence will be 1,2,3....etc

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.