<?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: Percentage of total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2402551#M62951</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, I create a sample.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is my formula of times measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Tims =
CALCULATE (
    COUNT ( FactsB2CRawdata[Net_Promoter_Score] ),
    FILTER ( 'FactsB2CRawdata', 'FactsB2CRawdata'[Result] = "Yes" )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Get the correct result as yours.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here's my solution.&lt;/P&gt;
&lt;P&gt;Create two measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Percentage = DIVIDE([Tims],CALCULATE([Tims],ALL(FactsB2CRawdata)))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;% Promoters - % Detractors =
CALCULATE (
    [Percentage],
    'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Promoter"
)
    - CALCULATE (
        [Percentage],
        'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Detractor"
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Put the Percentage in the Values of the matrix, get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 08:03:04 GMT</pubDate>
    <dc:creator>v-yanjiang-msft</dc:creator>
    <dc:date>2022-03-18T08:03:04Z</dc:date>
    <item>
      <title>Percentage of total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2392078#M62250</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some help with calculating a percentage per group and then the difference between the two. These are 2 matrixes coming from customer satisfaction surveys:&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;The first one has all the results from 0-10 that clients can give us, with the number of times we got the specific result. The second matrix has the results grouped. 9-10 = Promoter, 7-8 are Passive, 0-6 Detractors. The number of times is just a measure using a count formula. The grouping in the 2nd matrix has been made in the column &lt;EM&gt;Net_Promoter_Score&lt;/EM&gt;&amp;nbsp;in the table &lt;EM&gt;FactsB2CRawdata&lt;/EM&gt;. So the column name is &lt;EM&gt;'FactsB2CRawdata'[Net_promoter_Score(groups)]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm now looking to create 2 calculations&lt;/P&gt;&lt;P&gt;- the percentage of "Detractor", "Passive" or "Promoter" vs total&lt;/P&gt;&lt;P&gt;- the outcome of % Promoters - % Detractors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help,&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Jeroen&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:38:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2392078#M62250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-14T10:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2392184#M62266</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;The general measure for this type of calculation is&lt;/P&gt;&lt;P&gt;Share % = DIVIDE(SUMX(&lt;EM&gt;FactsB2CRawdata[Net_promoter_Score(groups)]&lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;SUMX(ALLSELECTED(&lt;EM&gt;FactsB2CRawdata&lt;/EM&gt;), &lt;EM&gt;[Net_promoter_Score(groups)]&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where the factable is the first part and your measure goes with it. You may need to substitute your inital count measure for the first share of total.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 11:30:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2392184#M62266</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-14T11:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2402551#M62951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, I create a sample.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;This is my formula of times measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Tims =
CALCULATE (
    COUNT ( FactsB2CRawdata[Net_Promoter_Score] ),
    FILTER ( 'FactsB2CRawdata', 'FactsB2CRawdata'[Result] = "Yes" )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Get the correct result as yours.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here's my solution.&lt;/P&gt;
&lt;P&gt;Create two measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Percentage = DIVIDE([Tims],CALCULATE([Tims],ALL(FactsB2CRawdata)))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;% Promoters - % Detractors =
CALCULATE (
    [Percentage],
    'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Promoter"
)
    - CALCULATE (
        [Percentage],
        'FactsB2CRawdata'[Net_Promoter_Score(groups)] = "Detractor"
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Put the Percentage in the Values of the matrix, get the correct result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 08:03:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-total/m-p/2402551#M62951</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-03-18T08:03:04Z</dc:date>
    </item>
  </channel>
</rss>

