<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VAR of measure (shares) to parent category measure (shares in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782501#M37414</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;Couldn't be better than your solution. Thanx, a lot Kim for your precise reply and your time. Great work!!!&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 13:14:46 GMT</pubDate>
    <dc:creator>kostask</dc:creator>
    <dc:date>2021-04-13T13:14:46Z</dc:date>
    <item>
      <title>VAR of measure (shares) to parent category measure (shares</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782270#M37408</link>
      <description>&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;It looks pretty sophisticated and I'm struggling for many hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I have Customers / Customer Categories (A,B,C) /Product Categories (X,Y,Z). My central table has the sales data (Customer No, Product No &amp;amp; Sales Amount) and there is also another table with customer data (Customer No &amp;amp; &lt;FONT color="#FF0000"&gt;Customer Category&lt;/FONT&gt;) and another with products' data (Product No &amp;amp; &lt;FONT color="#FF0000"&gt;Product Category&lt;/FONT&gt;), which are connected to the central one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I've calculated the shares of the product categories to every customer category :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-- &lt;U&gt;Shares of Product Categories = DIVIDE([Total Sales],&amp;nbsp; CALCULATE([Total Sales],&amp;nbsp; ALL('Product Table')))&lt;/U&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;This works fine with customer Categories and the result of the Shares per Customer Category and product category is like this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. x&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. y&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. z&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;50%&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;40%&lt;/TD&gt;&lt;TD&gt;40%&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;60%&lt;/TD&gt;&lt;TD&gt;10%&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It also works fine with single customers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. x&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. y&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Product Categ. z&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Name1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;40%&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Name2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;50%&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Name3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;20%&lt;/TD&gt;&lt;TD&gt;40%&lt;/TD&gt;&lt;TD&gt;30%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So, let's say that Customer with &lt;STRONG&gt;Name 1&lt;/STRONG&gt;&amp;nbsp;with shares 30/40/30 belongs to&lt;STRONG&gt; Customer Category B &lt;/STRONG&gt;with product shares 40/40/20 as above.&lt;/P&gt;&lt;P&gt;The hard to do is to find the variance of every customer's product category shares to the shares of the products for his customer category.&lt;/P&gt;&lt;P&gt;It means that finally, I want to calculate 30-40 / 40-40 / 30-20 which will give -10/0/10.&lt;/P&gt;&lt;P&gt;Is it possible to create this measure and use it at the customer level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Apr 2021 10:42:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782270#M37408</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2021-04-13T10:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: VAR of measure (shares) to parent category measure (shares</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782354#M37411</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please correct me if I wrongly understood your question.&lt;/P&gt;&lt;P&gt;Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.&lt;/P&gt;&lt;P&gt;I created the sample and tried to apply your logic to my sample.&lt;/P&gt;&lt;P&gt;All measures are in the sample pbix file, and I hope you can easily follow the steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/qvigj4ihu246qcn/kostask.pbix?dl=0" target="_self"&gt;https://www.dropbox.com/s/qvigj4ihu246qcn/kostask.pbix?dl=0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;EM&gt;&lt;STRONG&gt;Hi, My name is Jihwan Kim. &lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;EM&gt;&lt;STRONG&gt;If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.&lt;BR /&gt;&lt;BR /&gt;Linkedin: &lt;A href="https://www.linkedin.com/in/jihwankim1975/" target="_blank"&gt;https://www.linkedin.com/in/jihwankim1975/&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 11:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782354#M37411</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-04-13T11:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: VAR of measure (shares) to parent category measure (shares</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782501#M37414</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;Couldn't be better than your solution. Thanx, a lot Kim for your precise reply and your time. Great work!!!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 13:14:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/VAR-of-measure-shares-to-parent-category-measure-shares/m-p/1782501#M37414</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2021-04-13T13:14:46Z</dc:date>
    </item>
  </channel>
</rss>

