Order Stacked Column Chart in Excel by values - excel

I was looking at the stacked column example here: http://office.microsoft.com/en-us/excel-help/present-your-data-in-a-column-chart-HA010218663.aspx.
I wanted to know how I can re-arrange the 3-D column chart to show regional sales by descending order of total sales without modifying the excel sheet data.
Basically, how can I modify how the data is being displayed in the chart without making any external changes.

Although normally stacked bar charts are plotted as ranges they can be plotted cell by cell. Once you have decided the order (ie Southwest, Northwest etc in the linked example) the horizontal axis can be plotted as =(Sheet1!$A$5,Sheet1!$A$2,Sheet1!$A$4,Sheet1!$A$6,Sheet1!$A$3) and each of the data series in the same way.

Related

Need help on creating Custom Pivot chart

I need help in creating a Pivot chart. I have dates as a timeline and 4 categories but the values are difference between those 4 categories with points and without points.
I want a pivot chart with 4 categories as a column on each month and out of those 4 column it is stack with the value of categories without and with points
I tried creating it on pivot chart combo but it won't work and also trying to overlap two pivot chart but its ugly
The output in mind is something like this. A stack column within stack pivot chart. So example below is a column chart I need to change the value representation on each column chart that it has stack of those 4 categories with and without points
Pivot charts are very limited compared to the charting techniques that can be used in regular charts. You can build a regular chart based on the data that the pivot table returns. If the number of rows of the pivot table varies, you can use dynamic range names with formulas that capture the pivot table columns and use these for the chart.
What you describe looks very much like a stacked clustered column chart, which is not a standard chart, but can be created with a few tricks. Jon Peltier has a tutorial here for a result that looks like this:
Such a stacked bar chart out of a pivot table can be created with https://www.koia.io.
The source code is on https://github.com/centeractive/koia
Koia protects your data privacy -  you do NOT need to upload your data but it ALWAYS stays local on your machine.
 
In koia, you can create pivots with just a couple of mouseclicks:
Choose the data that you want to work with
Go to the pivot table tab in the header
Drag&drop your columns/row values as you want them to be displayed in your pivot table
Choose the “stacked bar chart” option in the upper right corner (see picture)
Koia will automatically create the stacked bar chart.
The drag&drop options allow you to play around with your data (timeline and different categories) and see the changes in real-time

Offset function for dynamic range not ignoring cells with #N/A in Line Chart

I am facing an issue with excel offset function for a range which increases horizontally and vertically.
I have a pivot table built from raw data which keeps on updating. I am mainly concerned with products and corresponding price per quarter in the pivot.
I have created another sheet pulling the products from the pivot and corresponding blended price (calculated based on pivot values - Sales/Units).
Below is the code:
Formula to pull the products from the pivot:
IFERROR(INDEX($A$10:$A$155, AGGREGATE(15,3,ROW($A$10:$A$155)-ROW($A$9)/($A$10:$A$155<>""),ROWS($A$10:A10))),#N/A)
Formula to display the corresponding blended price for the product:
IFERROR(INDEX(AZ$10:AZ$155, MATCH($CC10,$A$10:$A$155,0)),#N/A)
Now I need to create a line chart for the above data. Below is the code for Name Manager:
Quarters=OFFSET('Blended Price Calculation'!$CD$9,0,0,1,COUNTA('Blended Price Calculation'!$CC$9:$DA$9)-1)
0.45_Saline=OFFSET('Blended Price Calculation'!$CD$10,0,0,1,COUNTA('Blended Price Calculation'!$CC$10:$DA$10)-1)
0.9_Saline=OFFSET('Blended Price Calculation'!$CD$11,0,0,1,COUNTA('Blended Price Calculation'!$CC$11:$DA$11)-1)
10_Dextrose=OFFSET('Blended Price Calculation'!$CD$12,0,0,1,COUNTA('Blended Price Calculation'!$CC$12:$DA$12)-1)
Similarly for the rest of the products
I want to the horizontal axis to be Quarters and not Products.
Dashboard - Filter based on Slicer
Original Excel without filter
Excel when Slicer filter is applied (to display only 2 products)
Problem:
The chart displays #N/A when I filter data using Slicer in the dashboard. Slicer is acting on pivot table. Basically I need help on offset function which will pick only those values which has data for both rows and columns. Currently I have the formula working for Columns but it is not working for rows, hence the line chart is considering all the rows. But since I have selected only a couple of products (using slicer) out of 100 odd products, line chart shows graph perfectly for those selected products and shows #N/A for the rest.
How can I not display #N/A in my chart legend? I think having a combination of vertical and horizontal offset function should solve my problem but I am struggling to find the solution.
Any help is really appreciated! Thank you!
The issue here is that you have hard-wired ten series into the chart. You can use range names to dynamically change the number of data points in a series, but you can't use a formula approach to dynamically change the number of series in a regular Excel chart. That will require VBA.
If you use a pivot chart instead, you can select the series with a slicer and the legend will show only the visible series.
Edit: Here is a screenshot to illustrate how a pivot chart can be filtered and unused series will not show in the legend.

Dynamic XY scatter chart

I am trying to create a dynamic XY scatter chart. Basically the chart is based on two columns. The first is the client name and the second a number which I want to plot on the XY scatter graph. The client name will be in the legend entry and the horizontal access will contain the value.
What I need however is a dynamic chart that changes based on the number of clients I have. The problem I have is that because the legend series is the one that changes I can't use a named range and if I put it in the Chart data range it changes to the exact reference. Any ideas would be appreciated
You can use a macro in your Worksheet_Change event to dynamically update a named range using Range('First Cell of the Data Range').CurrentRegion

Excel Column Chart Data in table but not in graph

I am currently creating a column chart that compares two years of sales data (2012 and 2013). I want to show the data in a table below the column graph that also includes a percentage change. I have this all figured out, but cannot seem to figure out a way to eliminate the percentage change column from the graph itself.
So my question is how can I keep the % change data in the chart below the graph but eliminate it from the column graph itself??
Thank you.
Patrick Wilson
If it's in the table it's in the chart. A few work arounds:
Make the series fill for % bars no fill and same for the outline
Plot it on a second axis and format such that this axis is not displayed
Fake the table, using cells and don't use the data table. Format and position the chart above it.
In my experience the 3rd one is the most work, but the best. Chart tables are hard to format.
I change the chart type (ie. bar chart) and the switch back to the pie chart and it worked. Hope it works for others. Scott
For a bar chart, I change the chart to a combo, make the data I don't want shown a line and then format it so that there is no fill or border, and delete the legend and select "Data Table with Legend Keys" No color will show next to the row of data not visible on the on the chart.

Excel chart changing all data labels from value to series name simultaneously

I am having this problem in excel stacked column chart while trying to change the labels. My graph has multiple columns and hundreds of stacked values (series) in each column.
By selecting chart then from layout->data labels->more data labels options ->label options ->label contains-> (select)series name, I can only get one series name replacing its respective label values. For more than hundred series stacked in columns i want them all to be changed at once, is there any way out? why it does not change them all at once?
I know this is old but I wanted to post what I figured out. I was having the same problem in the pivot table chart. I was unable to change ALL of the labels at once. What I did was remove the series from the chart all together. I then was able to select the "series" data label and have it change all the labels. After I did that I simply added the series back in and it populated all of my data labels with the "series" information.

Resources