cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
alim94 Frequent Visitor
Frequent Visitor

Change order of columns in a stacked column chart

Hi, 

 

In a stacked column chart, I'm trying to change the order that the columns are displayed in. The labels are in text format because they are categories. I've tried sorting them by ascending and descending, but for some reason, the 6-12 category is recognized as the highest value. Anyway to change this so that it lists 0-6, 6-12, 12-24, and 24+?

 

Thank you, 

 

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Change order of columns in a stacked column chart

Hi,

 

Try this

 

  1. Create a seperate 2 column Table - Category and Order of Category.  The Order of Category column will have numbers from 1 to 4.  Name this Table as Category_order
  2. Create a relationship from the Category column of your base data Table to the Category column of your new Table
  3. In the base data Table, write this calculated column formula and name the column as Order

=RELATED(Category_order[Order])

 

  1. Click on any cell in the Category column of your base data table and go to Home > Sort by Column > Order
  2. In your visual, drag the Category field from the base data Table

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Change order of columns in a stacked column chart

Hi,

 

Try this

 

  1. Create a seperate 2 column Table - Category and Order of Category.  The Order of Category column will have numbers from 1 to 4.  Name this Table as Category_order
  2. Create a relationship from the Category column of your base data Table to the Category column of your new Table
  3. In the base data Table, write this calculated column formula and name the column as Order

=RELATED(Category_order[Order])

 

  1. Click on any cell in the Category column of your base data table and go to Home > Sort by Column > Order
  2. In your visual, drag the Category field from the base data Table

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

alim94 Frequent Visitor
Frequent Visitor

Re: Change order of columns in a stacked column chart

Hi Ashish, 

 

When I try to create a relationship between my base data column and the new category column, it says that i can't create a relationship because one of the columns must have unique values. 

Community Support Team
Community Support Team

Re: Change order of columns in a stacked column chart

Hi @alim94,

 

You can try to create a calculated table with unique value as bridge table to link these tables.

 

Sample:

Bridge Table =
DISTINCT (
    UNION ( VALUES ( Table1[ColumnName] ), VALUES ( Table2[ColumnName] ) )
)

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |
Super User
Super User

Re: Change order of columns in a stacked column chart

Hi,

 

In the Category_Order Table, there should only be unique entries in the Category column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Chelle New Member
New Member

Re: Change order of columns in a stacked column chart

When I select 'Create Column' in the Calculations tab, the new column appears and then disappears in the table where I'm trying to add it.  Help.

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 306 members 3,612 guests
Please welcome our newest community members: