<?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: formula to calculate % of column total for multiple hierarchies in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formula-to-calculate-of-column-total-for-multiple-hierarchies/m-p/1615671#M32555</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , You have the option of % of the total, So add the measure again and right on the measure on in visualization pane and use % of total&lt;/P&gt;
&lt;P&gt;If region 1 is because of value (means row value in region) a measure like this &lt;/P&gt;
&lt;P&gt;% of total = divide([measure] , calculate([measure],allexcept(Table, Table[region]))&lt;/P&gt;
&lt;P&gt;if region 1 is&amp;nbsp; column&lt;/P&gt;
&lt;P&gt;% of total region 1= divide([measure] , calculate([measure],allt(Table[region1]))&lt;/P&gt;
&lt;P&gt;% of total region 2= divide([measure] , calculate([measure],allt(Table[region2]))&lt;/P&gt;
&lt;P&gt;Also refer : &lt;A href="https://www.youtube.com/watch?v=6jTildcV2ho" target="_blank"&gt;https://www.youtube.com/watch?v=6jTildcV2ho&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2021 03:51:36 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-01-22T03:51:36Z</dc:date>
    <item>
      <title>formula to calculate % of column total for multiple hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formula-to-calculate-of-column-total-for-multiple-hierarchies/m-p/1615110#M32515</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a measure for market share (% of column total) to be used in a matrix. This is an example of my expected result - each hierarchy should be calculated against the column total in the specific region.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;All the formulas I have tried either calculate the % over grand total and not the region specific column total. My current formula only produces correct %s for the first 2 hierarcies (segment/subsegment). If anyone has worked with this before, I will appreciate any feedback. Thank you so much in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VAR currentsale = [Sales]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR productsales = CALCULATE([Sales], ALLSELECTED('Segment'))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR subsegmentsale = CALCULATE([Sales], ALLSELECTED('Segment'))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR segmentsale = CALCULATE([Sales], ALLSELECTED('Segment'[segment]))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR grandsale = CALCULATE([Sales])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VAR Result = IF(ISINSCOPE(Series[product]), DIVIDE(currentsale,modelsales),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF(ISINSCOPE('Segment'[subsegment]), DIVIDE(currentsale,manufacturersale),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF(ISINSCOPE('Segment'[Segment]),DIVIDE(currentsale,groupsale),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DIVIDE(currentsale, grandsale))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Result&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 20:26:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formula-to-calculate-of-column-total-for-multiple-hierarchies/m-p/1615110#M32515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-21T20:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: formula to calculate % of column total for multiple hierarchies</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formula-to-calculate-of-column-total-for-multiple-hierarchies/m-p/1615671#M32555</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , You have the option of % of the total, So add the measure again and right on the measure on in visualization pane and use % of total&lt;/P&gt;
&lt;P&gt;If region 1 is because of value (means row value in region) a measure like this &lt;/P&gt;
&lt;P&gt;% of total = divide([measure] , calculate([measure],allexcept(Table, Table[region]))&lt;/P&gt;
&lt;P&gt;if region 1 is&amp;nbsp; column&lt;/P&gt;
&lt;P&gt;% of total region 1= divide([measure] , calculate([measure],allt(Table[region1]))&lt;/P&gt;
&lt;P&gt;% of total region 2= divide([measure] , calculate([measure],allt(Table[region2]))&lt;/P&gt;
&lt;P&gt;Also refer : &lt;A href="https://www.youtube.com/watch?v=6jTildcV2ho" target="_blank"&gt;https://www.youtube.com/watch?v=6jTildcV2ho&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 03:51:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/formula-to-calculate-of-column-total-for-multiple-hierarchies/m-p/1615671#M32555</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-01-22T03:51:36Z</dc:date>
    </item>
  </channel>
</rss>

