Advanced Stacked Column Chart

segan

New Member
Joined
Feb 20, 2009
Messages
1
I'm trying to build a stacked column chart in which each group of data will be sorted by descending share (by channel). My data is set-up in the following way:


<table x:str="" style="border-collapse: collapse; width: 224pt;" width="300" border="0" cellpadding="0" cellspacing="0"><col style="width: 56pt;" span="4" width="75"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 56pt;" width="75" height="17">Channel</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group A</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group B</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group C</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">1</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.8</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.2</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.7</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.8</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">6</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">1</td> </tr> </tbody></table>


The way I have it set-up now, I can only have the stacks sorted by one of the groups or by channel (here sorted by descending Group A). Is there a relatively simple way to sort each of the columns (Groups A-C) descending in the chart, yet retain the appropriate channel label?

For example, I want my chart to be set-up like this:
<table x:str="" style="border-collapse: collapse; width: 336pt;" width="450" border="0" cellpadding="0" cellspacing="0"><col style="width: 56pt;" span="6" width="75"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl24" style="height: 12.75pt; width: 56pt;" width="75" height="17">Channel</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group A</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Channel</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group B</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Channel</td> <td class="xl24" style="border-left: medium none; width: 56pt;" width="75">Group C</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">1</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.8</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">6</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.7</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">1</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.8</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.2</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.2</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">1</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">0.1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">4</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">3</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl24" style="border-top: medium none; height: 12.75pt;" x:num="" align="right" height="17">6</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">6</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl24" style="border-top: medium none; border-left: medium none;" x:num="" align="right">5</td> <td class="xl24" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>

I cannot figure out how to get data set-up like this to chart the way I would like it to, though.


Thank you for your help,

Sarah
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top