Non out-of-the-box chart in Excel - excel

We have a particular chart that we like using. I saw it in a book by Stephen Few:
The blue series is actually a line chart with markers: the markers have been expanded and the line has been deleted.
So it is not an out-of-the-box Excel chart but rather a bit of a hack.
What I don't seem to be able to do is spin it on it's side. So if I draw in the second series this is what I'm trying to achieve:
I'm happy either just hacking the chart wizards or using a vba solution.

To get this type of chart you need three columns of data, plotted on two axis, and build the chart in stages.
First, your data should look like this:
Next, select A1:B4 and Insert and Stacked Bar Chart to get this:
Now, select C1:D4 and Copy, then select your chart and Paste Special (add cells as New Series; Values in Columns; Series Names in First Row) to get this:
Excel just changed your chart type to a simple Bar Chart, but you still want a Stacked Bar Chart. So right click in the chart and Change Chart Type to Stacked Bar.
You'll notice that the scale of your primary axis is not showing what you need. In order to solve this, we'll move the two "Prev" columns to the Secondary Axis.
So, show the Format ribbon and in the upper left corner drop down menu select "Series PrevMthInvis", then click the Format Selection button underneath the drop down. In the Format dialog under Series Options, choose Secondary Axis. Then under Fill, select No Fill.
Back to the Ribbon and select "Series PrevMth" and Format Selection again. Select Secondary Axis, and change the Fill color to your desired value. Finally change the Gap Width to 50%.
At least in my Excel chart, the series are not in the correct order. You want the "PrevMth" series to be stacked on top of "PrevMthInvis", so right click on the chart and choose Select Data, then move the series to be ordered Mth, PrevMthInvis, then PrevMth.
The final clean up involves right clicking the secondary axis (the upper horizontal axis) and making sure the scale, min, and max matches the primary axis, then set Major and Minor Tick Marks and the Axis Labels to "None". Lastly, select "PrevMthInvis" in the legend and delete it.
You can change the width of your blue "bar" by changing the "PrevMth" value to 0.5 or whatever is best for you. Good luck!

Related

In powerbi, is it possible to have axis that changes with sliders?

I was asked to create a bar chart in powerbi whose horizontal axis is able to change with the slicers on screen.
The intended horizontal axis is the rank_category field. You must have noticed that the same field is expressed as a measure, rank_category, and a calculated column, rank_cate.
I've put the rank_category measure in the table at the top (last column), and used rank_cate as the horizontal axis in the bar chart on bottom right; in the bottom left bar chart, the horizontal axis is also rank_cate but it's created via a calculated table.
By selecting the items in the slicer, the measure in the table will has its value changed; the bottom left bar chart doesn't change at all, and the bottom right bar chart also changes but the rank_cate field's value doesn't change. It's just the slicer filtering out those who are not in the group.
So my question is, is it possible at all to create a bar chart with an axis whose value will change according to the slicer, like the last column in the table? Apparently bar charts can only take on columns as an axis, not measures, and calculated columns don't change with slicers. But it would be great to know if anyone has a way around this.
Thanks very much. (The 1st image is the report without slicer on; the 2nd is with slicer selection)

Dynamically Change Chart Rate Based on Option Button Selection

I have been trying to dynamically change the range of a stacked bar chart to adapt to different selections of three option buttons. My table is arranged from J1:M14. The top line contains the headers for each column. The first column (J) contains a descriptive column. The actual data is contained between columns K and M. One selection of the option button results in the range of the data expanding to J1:M15. So, based on the option button selection, the number of rows in this table increase, but the number of columns remains fixed.
I want to create a stacked bar chart that displays each of the stacked bars for each descriptive label in column J. With a different selection of the option button, the stacked bar chart will either extend to include the extra label, shrink to remove the extra label, or keep the same length.
What is happening: The range is fixed and will not change. When I select the option button, the range does not shift based on the data range.
What I have tried: Under formulas-->Name Manager, I have created four new names:
1.) DatainColumnK: =OFFSET(Calculations!$K$2,,,COUNTIF(Calculations!$K$2:$K$100,"<>"))
2.) DatainColumnL: =OFFSET(Calculations!$L$2,,,COUNTIF(Calculations!$L$2:$L$100,"<>"))
3.) DatainColumnM: =OFFSET(Calculations!$M$2,,,COUNTIF(Calculations!$M$2:$M$100,"<>"))
4.) DescLabelColJ: =OFFSET(Calculations!$J$2,,,COUNTIF(Calculations!$J$2:$J$100,"<>"))
Next, I selected the entire range of the data --> Created a stacked bar chart --> Clicked Select data --> Added three new series in the Legend Entries by editing series and only entering in TabName!DatainColK, TabName!DatainColL, TabName!DatainColM and then editing the axis labels by adding in TabName!DescLabelColJ.
Is there something I'm missing?

How to plot columns on a chart when one column contains large values and the others small

I want to make a bar chart in SSRS and my table contains multiple columns. One column contains large values over 100 while the others contain values between 1 and 10. The other columns are pressed by the large columns. I multiplied the other columns values by 10 but I am not sure if this is the right way to make them visible. Please suggest.
If you can get away with multiplying one value by a factor then it makes some sense to do this. Depending on what you are trying to achieve, I would consider having the larger values as columns and then the smaller values as a marker on the secondary axis. A step by step guide to do this is below, assuming you have the current column chart created.
Right-click on one of the columns of the smaller valued data set on the chart
Select Change Series Chart Type.. and change it to a line graph
Click on the new created line
On the Format tab, under the Current Selection grouping, click Format Selection.
In the Format Data Series dialog box, on the Series Options tab, select Secondary Axis
Still within the Format Data Series dialog box, on the Marker Options tab, select a style of marker you would like to use, as well as the fill of the marker on the Marker Fill tab
Under the Line Color tab select No line
Click Close in the corner of the dialog box
This will create a chart similar to the below.
For your requirement, I think it's better to use scale break to make a better view.
https://technet.microsoft.com/en-us/library/bb934379(v=sql.100).aspx

stacked bar chart custom format

I have a stacked bar chart in excel. This is made up of positive and negative comments. I can get the negative topic names down one side of the axis but can't work out how to get the positive down the right hand side of the chart?
From the example attached I want the axis titles on both the left and right of the graph? I've been stuck on this for a few days and have researched this.
Thank you in advance for any help!
What you can do is:
Add a new series of data plotting a value of 0 for each category, and using your "good" labels for the category axis data.
Format the new series to plot on a secondary axis
Add a secondary vertical axis, and format it to display the categories in reverse order
Demo file here: http://1drv.ms/1xrnjBg
Alternative that may be more robust because it doesn't mess with primary and secondary axes...
Here is the data, with bad label captions, bad percentages, good percentages, and good label captions. I've inserted a column of zero values between good ercentages and good label captions.
I selected A1:D5, that is, the whole data range excluding the good label captions, and then inserted a stacked bar chart, shown below the table. I've reversed the direction of the categories on the vertical axis and changed where the horizontal axis crosses to the maximum category, so the items are in the same order as in the worksheet. I also deleted the legend and adjusted the plot area to provide room in the right margin of the chart for the labels.
I selected the "blank" series (by clicking the green series, then clicking the up arrow key), and added data labels, shown in the second chart.
I formatted these data labels in the third chart so that they are in the Inside Base position, which moves them outside the plot area.
In the fourth chart I used the Values from Cells option to the data labels, and selected the range of labels in column E. This isn't available before Excel 2013, but you can change the labels in a number of ways:
Select each label individually (click once to select all labels, click again after a slight pause to select each specific label), double click on the text of the label, and overtype it with the text you want to show.
Select each label individually (click once to select all labels, click again after a slight pause to select each specific label). Don't go into edit mode: you don't want the cursor flashing in the label. Type = in the formula bar, then click in the cell with the desired label. This is a link to the cell, so changing the cell contents will change the displayed text in the label accordingly.
Use Rob Bovey's Chart Labeler, a free Excel add-in from AppsPro.com.

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.

Resources