<?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: Calculate the percentage of table matrix as well as subtotals in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372267#M60922</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;You can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Share per Brand = 
VAR ProductSahre =
    DIVIDE (
        [Sales_],
        CALCULATE ( 
            [Sales_],
            ALLEXCEPT ( 'tblProduct','tblProduct'[Brand_name] )
        )
    )
VAR BrandShare =
    DIVIDE (
        [Sales_],
        CALCULATE ( 
            [Sales_],
            REMOVEFILTERS ( 'tblProduct' )
        )
    )
VAR Result =
    IF ( 
        HASONEVALUE ( 'tblProduct'[Model] ),
        ProductSahre,
        BrandShare
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 09:40:28 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-03-03T09:40:28Z</dc:date>
    <item>
      <title>Calculate the percentage of table matrix as well as subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372189#M60915</link>
      <description>&lt;P&gt;I need to calculate the Share of the below table, I was able to calculate in Pbi the share per Brand by using this DAX&lt;BR /&gt;&lt;SPAN&gt;=DIVIDE([Sales_],&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE([Sales_],&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT('tblProduct',&lt;/SPAN&gt;&lt;SPAN&gt;'tblProduct'[Brand_name])))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However subtotal needs to calculate the share base on column total (sub-total / Column Total)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In my case sub-total is returning 100%&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirements: i write here as well the excel formula (Column F) on how to calculate the share and its sub-total.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372189#M60915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T09:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the percentage of table matrix as well as subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372244#M60920</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Create a measure like &lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if(isinscope('tblProduct'[Model]) ,&lt;/P&gt;
&lt;P&gt;DIVIDE([Sales_], CALCULATE([Sales_], ALLEXCEPT('tblProduct','tblProduct'[Brand_name]))),&lt;/P&gt;
&lt;P&gt;DIVIDE([Sales_], CALCULATE([Sales_], ALL()))&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:30:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372244#M60920</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-03-03T09:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the percentage of table matrix as well as subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372267#M60922</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;You can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Share per Brand = 
VAR ProductSahre =
    DIVIDE (
        [Sales_],
        CALCULATE ( 
            [Sales_],
            ALLEXCEPT ( 'tblProduct','tblProduct'[Brand_name] )
        )
    )
VAR BrandShare =
    DIVIDE (
        [Sales_],
        CALCULATE ( 
            [Sales_],
            REMOVEFILTERS ( 'tblProduct' )
        )
    )
VAR Result =
    IF ( 
        HASONEVALUE ( 'tblProduct'[Model] ),
        ProductSahre,
        BrandShare
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:40:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372267#M60922</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-03-03T09:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the percentage of table matrix as well as subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372298#M60924</link>
      <description>&lt;P&gt;It works! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have another requirements, same table as my example but we need to add additional column at Highest level, but this comes from another table,&amp;nbsp;&lt;BR /&gt;lets call the column as Customer_name from tblCustomer.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:51:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372298#M60924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T09:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the percentage of table matrix as well as subtotals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372434#M60935</link>
      <description>&lt;P&gt;This works as well, together with using dims in another table, thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 11:06:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-percentage-of-table-matrix-as-well-as-subtotals/m-p/2372434#M60935</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T11:06:29Z</dc:date>
    </item>
  </channel>
</rss>

