<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peltier Tech Blog &#187; You Asked For It</title>
	<atom:link href="http://peltiertech.com/WordPress/category/you-asked-for-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Conditional XY Charts Without VBA</title>
		<link>http://peltiertech.com/WordPress/conditional-xy-charts-without-vba/</link>
		<comments>http://peltiertech.com/WordPress/conditional-xy-charts-without-vba/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 12:55:10 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[You Asked For It]]></category>
		<category><![CDATA[conditional chart]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2962</guid>
		<description><![CDATA[It&#8217;s been a busy week, and I haven&#8217;t had time to write any new posts. However, in a comment to VBA Conditional Formatting of Charts by Value, Dean asked how to conditionally format points in an XY chart according to which quadrant they fall in, where the quadrants are determined by the mean X and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a busy week, and I haven&#8217;t had time to write any new posts. However, in a comment to <a href="http://peltiertech.com/WordPress/wp-admin/post.php?action=edit&amp;post=20"title="VBA Conditional Formatting of Charts by Value" >VBA Conditional Formatting of Charts by Value</a>, <strong>Dean</strong> asked how to conditionally format points in an XY chart according to which quadrant they fall in, where the quadrants are determined by the mean X and Y values. Raqther than writing a long comment in response, I decided to write a short post.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/QuadConditionalChart.png" alt="XY Chart With Formatting Applied According To Quadrant Where Each Point Is Located" /></p>
<p>Of course, you can format any chart&#8217;s data points with VBA, according to any conditions you want. But some things are easier to do and less complicated to maintain if you use Excel&#8217;s built in worksheet functions. I have covered worksheet-based conditional formatting of charts in <a href="http://peltiertech.com/Excel/Charts/ConditionalChart1.html" rel="nofollow" title="Simple Conditional Charts" >Simple Conditional Charts</a> and <a href="http://peltiertech.com/Excel/Charts/ConditionalChart2.html" rel="nofollow" title="Simple Conditional Charts - 2" >Simple Conditional Charts &#8211; 2</a>. But it&#8217;s good to write up more examples of suitable formulas to match the formatting criteria, to help people see when they can use this technique.</p>
<p><span id="more-2962"></span>To illustrate my answer to Dean&#8217;s question, I generated the following data. Columns A and B have the original X and Y data, which I sampled from normal distributions. The mean values for X and Y are computed in A1 and B1. Columns C through F contain the Y values for each of the quadrants, determined by a simple set of formulas.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/QuadrantData.png" alt="Data for Conditional Quadrant XY Chart" /></p>
<p>The formulas in C3 through F3 are as follows, and are filled down to row 14:</p>
<p style="padding-left: 30px;">C3: <tt>=IF(AND($A3&gt;=$A$1,$B3&gt;=$B$1),$B3,NA())</tt><br />
 D3: <tt>=IF(AND($A3&lt;$A$1,$B3&gt;=$B$1),$B3,NA())</tt><br />
 E3: <tt>=IF(AND($A3&lt;$A$1,$B3&lt;$B$1),$B3,NA())</tt><br />
 F3: <tt>=IF(AND($A3&gt;=$A$1,$B3&lt;$B$1),$B3,NA())</tt></p>
<p>Here is a chart of the original data, using A2:B14 as the chart&#8217;s source data range:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/QuadUnconditionalChart.png" alt="XY Chart Without Individually Applied Formatting" /></p>
<p>Here is the chart showing the data by quadrant, with one series per quadrant, using column A for all X values and columns C through F for the Y values of the four series:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/QuadConditionalChart.png" alt="XY Chart With Formatting Applied According To Quadrant Where Each Point Is Located" /></p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/conditional-xy-charts-without-vba/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Label Totals on Stacked Column Charts</title>
		<link>http://peltiertech.com/WordPress/label-totals-on-stacked-charts/</link>
		<comments>http://peltiertech.com/WordPress/label-totals-on-stacked-charts/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 05:00:04 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[You Asked For It]]></category>
		<category><![CDATA[data labels]]></category>
		<category><![CDATA[stacked charts]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2567</guid>
		<description><![CDATA[A common question is &#8220;How can I label the total stack values in a stacked column chart?&#8221; When you add data labels to the chart, you can&#8217;t get any labels showing the totals. Let&#8217;s use some simple data to illustrate. Here is a standard stacked column chart. When we apply data labels to the chart, [...]]]></description>
			<content:encoded><![CDATA[<p>A common question is &#8220;How can I label the total stack values in a stacked column chart?&#8221; When you add data labels to the chart, you can&#8217;t get any labels showing the totals.</p>
<p>Let&#8217;s use some simple data to illustrate.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabelsdata1.png" alt="stacked chart data" /></p>
<p>Here is a standard stacked column chart.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels01.png" alt="stacked column chart" /></p>
<p><span id="more-2567"></span>When we apply data labels to the chart, we get a label for each column segment in the stack, but no labels for the total of each stack.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels02.png" alt="stacked column chart with labels" /></p>
<p>We only need to add a series to the chart that encodes the totals. Column E has the totals for each stack.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabelsdata2.png" alt="stacked chart expanded data" /></p>
<p>Construct the chart as a stacked column chart, with the Totals column stacked on top.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels03.png" alt="stacked column chart with totals series" /></p>
<p>Change the Totals column series to a line chart type series.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels04.png" alt="stacked column chart with totals line chart series" /></p>
<p>Add data labels to the Totals series.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels05.png" alt="stacked column chart with totals line chart series and labels" /></p>
<p>Move the labels to the Above position (right click on the labels and choose &#8220;Format&#8221; to open the format dialog).</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels06.png" alt="stacked column chart with totals line chart series and labels" /></p>
<p>Hide the Totals series by formatting it to show no lines and no markers.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stackchartlabels07.png" alt="stacked column chart with totals labels" /></p>
<p>Nicely done, without being too sneaky: just one hidden series.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/label-totals-on-stacked-charts/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>New Series: You Asked For It</title>
		<link>http://peltiertech.com/WordPress/new-series-you-asked-for-it/</link>
		<comments>http://peltiertech.com/WordPress/new-series-you-asked-for-it/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 05:00:46 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[You Asked For It]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2553</guid>
		<description><![CDATA[I field a fair number of questions, either in my blog&#8217;s comments, in the various online forums, or via email. Sometimes the question in a comment is a bit off topic, or the answer is more than I want to bury in my own comment. The forum&#8217;s text-only format may not be sufficient to show [...]]]></description>
			<content:encoded><![CDATA[<p>I field a fair number of questions, either in my blog&#8217;s comments, in the various online forums, or via email. Sometimes the question in a comment is a bit off topic, or the answer is more than I want to bury in my own comment. The forum&#8217;s text-only format may not be sufficient to show the answer. Or the email question is of more general interest and I want to share it.</p>
<p>To address this situation, I&#8217;ve decided I need a new category of blog posts: <strong>You Asked For It</strong>.</p>
<p>In this first installment, I&#8217;ll answer a question from the comments about <a href="http://peltiertech.com/WordPress/clustered-stacked-column-charts/"title="Clustered-Stacked Column Charts | PTS Blog" >Clustered-Stacked Column Charts</a>. Janez asked how to make a chart that has a column chart with composite values (e.g., 1, 2) growing like stalagmites from the bottom, and clustered constituent values (1a, 1b, 2a, 2b) hanging like stalagtites from the top. I&#8217;m not sure this is the best way to represent this information, but I&#8217;ll show this chart and I&#8217;ll show my preferred approach.</p>
<p><span id="more-2553"></span>I made up some simple data:</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalagsdata.png" alt="stalagmite chart data" /></p>
<p>The chart begins its life as a simple clustered column chart. I&#8217;ve changed the gap width to 100.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags01.png" alt="stalagmite chart - clustered column precursor" /></p>
<p>The A and B series are moved to the secondary axis. I&#8217;ve also added data labels to these two series, positioned the labels in the central position, and edited the text of the labels.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags02.png" alt="stalagmite chart - primary and secondary columns" /></p>
<p>I&#8217;ve changed the secondary axis gap width to 200, which for two series matches it up with the primary axis 100 gap width with one series. I&#8217;ve also removed the secondary Y axis, so all bars are measured on the same basis. Finally I&#8217;ve added custom data labels to the Total series as well. This is my preferred way to display this kind of data.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags03a.png" alt="stalagmite chart - my preferred column chart" /></p>
<p>So what if we still want the opposing columns? Take the second chart, and add a secondary category axis. The axis is added at the top of the chart, and the secondary series hang from it. They hang down to their values on the secondary Y axis, so the bar lengths do not encode the values: the space between the bars and the zero at the bottom of the chart represents the values. (I&#8217;ve temporarily changed the primary axis gap width so that the primary series are not totally obscured.)</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags04.png" alt="stalagmite chart - hang the secondary series" /></p>
<p>Format the secondary Y axis so that it is plotted in reverse order, and so the secondary category axis does not cross at the maximum value.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags05.png" alt="stalagmite chart - switch the secondary Y axis" /></p>
<p>That&#8217;s almost done. Let&#8217;s adjust both axis scales to run from zero to 140, so the bar lengths are scaled the same and they no longer overlap. The gap widths for primary and secondary series are 100 and 200.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags06.png" alt="stalagmite chart - hide the secondary category labels" /></p>
<p>This needs a little help. I&#8217;ve hidden the secondary category axis labels, and I&#8217;ve hidden the lines for both Y axes. I&#8217;ve hidden unneeded Y axis labels using custom number formats <tt class="tt">[&lt;=80]General;;;</tt> and <tt class="tt">[&lt;=60]General;;;</tt> and I&#8217;ve added labels to the Total series.</p>
<p align="center"><img src="http://peltiertech.com/images/2009-10/stalags07a.png" alt="stalagmite chart - finished" /></p>
<p>I think the preferred version of the chart (the third one in this post) is better for a few reasons. First, I think it&#8217;s less confusing or disorienting if all of the bars start at the same baseline and stretch in the same direction. Second, it&#8217;s more evident that the A and B columns are somehow related to the Total columns. Third, the resolution is better: the full Y axis scale is 80. The bottom chart&#8217;s fully Y axis scale of 140 squashes all of the bars and reduces resolution. Finally the first chart is a little less complicated to create and maintain.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/new-series-you-asked-for-it/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

