<?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>Top 10 | Capstone Analytics</title>
	<atom:link href="https://capstoneanalytics.com.au/tag/top-10/feed/" rel="self" type="application/rss+xml" />
	<link>https://capstoneanalytics.com.au</link>
	<description>Analytics Simplified</description>
	<lastBuildDate>Sun, 14 Jun 2020 04:00:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Strategic colouring in Power BI-Part 7: Dynamically plotting yearly percentage sales of top N products and measuring against a dynamic target</title>
		<link>https://capstoneanalytics.com.au/strategic-colouring-in-power-bi-part-7-dynamically-plotting-yearly-percentage-sales-of-top-n-products-and-measuring-against-a-dynamic-target/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=strategic-colouring-in-power-bi-part-7-dynamically-plotting-yearly-percentage-sales-of-top-n-products-and-measuring-against-a-dynamic-target</link>
					<comments>https://capstoneanalytics.com.au/strategic-colouring-in-power-bi-part-7-dynamically-plotting-yearly-percentage-sales-of-top-n-products-and-measuring-against-a-dynamic-target/#respond</comments>
		
		<dc:creator><![CDATA[Abhijith DSouza]]></dc:creator>
		<pubDate>Sat, 06 Jun 2020 04:03:10 +0000</pubDate>
				<category><![CDATA[Power BI]]></category>
		<category><![CDATA[DAX]]></category>
		<category><![CDATA[Selective Colouring]]></category>
		<category><![CDATA[Strategic Colouring]]></category>
		<category><![CDATA[Top 10]]></category>
		<guid isPermaLink="false">https://capstoneanalytics.com.au/?p=2254</guid>

					<description><![CDATA[This is the seventh post in the Strategic colouring in Power BI series. Links to all the posts can be found here https://capstoneanalytics.com.au/master-post-for-strategic-colouring-articles/ In the sixth post, we discussed how to isolate and visualise YTD data In this post we will discuss how to dynamically calculate the yearly percentage sales of top N products and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This is the seventh post in the Strategic colouring in Power BI series. Links to all the posts can be found here</p>
<p><a href="https://capstoneanalytics.com.au/master-post-for-strategic-colouring-articles/">https://capstoneanalytics.com.au/master-post-for-strategic-colouring-articles/</a></p>
<p>In the sixth <a href="https://capstoneanalytics.com.au/strategic-colouring-in-power-bi-part-6-visually-showcasing-the-years-in-which-a-selected-product-is-the-top-product/">post</a>, we discussed how to isolate and visualise YTD data</p>
<p>In this post we will discuss how to dynamically calculate the yearly percentage sales of top N products and measure it against a target % value. The technique used is different than the one used in the previous post. In the previous post we plotted sales of top 10 products by filtering the visuals to give the top 10 sales. This gave us the sales of the global top 10 products for each year. However what we want is the sales of top 10 products for each year and plot it accordingly.</p>
<p>We will use the same data model as the previous post. Since we will be dynamically plotting the sales, we need to calculate two parameters, one for top N and the other for target %. Our topN parameter  and target % parameter will be defined like this. Make sure the &#8216;Add slicer to this page&#8217; option is selected.</p>
<p><img fetchpriority="high" decoding="async" class="wp-image-2256 alignleft" src="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-parameter.png" alt="" width="368" height="353" /> <img decoding="async" class="alignnone wp-image-2255" src="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/Target-.png" alt="" width="389" height="365" /></p>
<p>Next we will calculate the Top N sales measure incorporating the TopN value measure defined in previous step</p>
<p>TopN Sales =<br />
<span class="Keyword" style="color: #035aca;">VAR</span> <span class="Variable" style="color: #49b0af;">top10sales</span> =<br />
<span class="indent4">    </span><span class="Keyword" style="color: #035aca;">ADDCOLUMNS</span><span class="Parenthesis" style="color: #808080;"> (</span><br />
<span class="indent8">        </span><span class="Keyword" style="color: #035aca;">GENERATE</span><span class="Parenthesis" style="color: #808080;"> (</span><br />
<span class="indent8">        </span><span class="indent4">    </span><span class="Keyword" style="color: #035aca;">VALUES</span><span class="Parenthesis" style="color: #808080;"> (</span> &#8216;Date'[Year] <span class="Parenthesis" style="color: #808080;">)</span>,<br />
<span class="indent8">        </span><span class="indent4">    </span><span class="Keyword" style="color: #035aca;">TOPN</span><span class="Parenthesis" style="color: #808080;"> (</span> [TopN Value], <span class="Keyword" style="color: #035aca;">VALUES</span><span class="Parenthesis" style="color: #808080;"> (</span> Products[ProductID.Product] <span class="Parenthesis" style="color: #808080;">)</span>, [Total Sales] <span class="Parenthesis" style="color: #808080;">)</span><br />
<span class="indent8">        </span><span class="Parenthesis" style="color: #808080;">)</span>,<br />
<span class="indent8">        </span><span class="StringLiteral" style="color: #d93124;">&#8220;TotalSalesTop10&#8221;</span>, [Total Sales]<br />
<span class="indent4">    </span><span class="Parenthesis" style="color: #808080;">)</span><br />
<span class="Keyword" style="color: #035aca;">RETURN</span><br />
<span class="indent4">    </span><span class="Keyword" style="color: #035aca;">SUMX</span><span class="Parenthesis" style="color: #808080;"> (</span> <span class="Variable" style="color: #49b0af;">top10sales</span>, [TotalSalesTop10] <span class="Parenthesis" style="color: #808080;">)</span></p>
<p>The topN sales % is calculated as</p>
<p>Top 10 Sales % =<br />
<span class="Keyword" style="color: #035aca;">DIVIDE</span><span class="Parenthesis" style="color: #808080;"> (</span> [TopN Sales], [Total Sales] <span class="Parenthesis" style="color: #808080;">)</span></p>
<p>In order to achieve strategic colouring we need to define three measures and compare the TopN sales % against the target measure</p>
<p>TopN Sales % Above Target =<br />
<span class="Keyword" style="color: #035aca;">IF</span><span class="Parenthesis" style="color: #808080;"> (</span> [TopN Sales %] &gt;= [Target % Value], [TopN Sales %], <span class="Number" style="color: #ee7f18;">0</span> <span class="Parenthesis" style="color: #808080;">)</span></p>
<p>TopN Sales % Below Target =<br />
<span class="Keyword" style="color: #035aca;">IF</span><span class="Parenthesis" style="color: #808080;"> (</span> [TopN Sales %] &lt; [Target % Value], [TopN Sales %], <span class="Number" style="color: #ee7f18;">0</span> <span class="Parenthesis" style="color: #808080;">)</span></p>
<p>Total Sales Remaining % =<br />
<span class="Number" style="color: #ee7f18;">1</span> &#8211; [TopN Sales % Above Target] &#8211; [TopN Sales % Below Target]</p>
<p>Now we are ready to plot. Create a line and stacked column chart and drag Year into Axis and drag the above three measures into Column values and drag Target % value into Line values. Under Data colours section of the chart give the following colours to the measures</p>
<p><img decoding="async" class="alignnone wp-image-2257" src="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-sales-data-colours.png" alt="" width="207" height="295" /></p>
<p>You can interact with the chart by changing the TopN and Target % sliders and see the effect on the charts</p>
<p>&nbsp;</p>
<div style="width: 1080px;" class="wp-video"><video class="wp-video-shortcode" id="video-2254-1" width="1080" height="552" preload="metadata" controls="controls"><source type="video/mp4" src="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-sales-against-a-target.mp4?_=1" /><a href="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-sales-against-a-target.mp4">https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-sales-against-a-target.mp4</a></video></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://capstoneanalytics.com.au/strategic-colouring-in-power-bi-part-7-dynamically-plotting-yearly-percentage-sales-of-top-n-products-and-measuring-against-a-dynamic-target/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://capstoneanalytics.com.au/wp-content/uploads/2020/06/TopN-sales-against-a-target.mp4" length="396072" type="video/mp4" />

			</item>
	</channel>
</rss>
