<?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 row total excluding blanks? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622318#M76435</link>
    <description>&lt;P&gt;Two approaches can solve this:&lt;/P&gt;
&lt;P&gt;1. Assuming you filter out \ slice out the blank BMI&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% In Population = 

    DIVIDE (
        COUNT ( 'Fact Table'[PersonKey] ),
        CALCULATE (
            COUNT ( 'Fact Table'[PersonKey] ),
            ALLSELECTED('Measurement Details'[BMI Category])
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Assuming you don't manually filter out anything:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE (
    DIVIDE (
        COUNT ( 'Fact Table'[PersonKey] ),
        CALCULATE (
            COUNT ( 'Fact Table'[PersonKey] ),
            REMOVEFILTERS ('Measurement Details'[BMI Category]  ),
            KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
        )
    ),
    KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 11:19:59 GMT</pubDate>
    <dc:creator>rbriga</dc:creator>
    <dc:date>2022-07-06T11:19:59Z</dc:date>
    <item>
      <title>Percentage of row total excluding blanks?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622156#M76420</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to calculate percentage of row total exluding blanks.&lt;BR /&gt;&lt;BR /&gt;In this example, it's the proportions of individuals that fall into certain BMI categories for each year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To do this, I'm using the DAX:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Proportions = &lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Fact Table'[PersonKey]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Fact Table'[PersonKey]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Measurement Details'[BMI Category]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issue is, some of the individuals don't have a BMI category stated, so there are blanks like so -&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there a way to calculate these proportions exluding blanks?&lt;BR /&gt;&lt;BR /&gt;- Thanks all!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 14:46:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622156#M76420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T14:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of row total excluding blanks?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622236#M76427</link>
      <description>&lt;P&gt;You may add to the CALCULATE:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Proportions = 
DIVIDE(
 COUNT('Fact Table'[PersonKey]),
 CALCULATE(
    COUNT('Fact Table'[PersonKey]),
    REMOVEFILTERS('Measurement Details'[BMI Category]),
    KEEPFILTERS(NOT ( ISBLANK('Measurement Details'[BMI Category])))
         )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Jul 2022 10:49:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622236#M76427</guid>
      <dc:creator>rbriga</dc:creator>
      <dc:date>2022-07-06T10:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of row total excluding blanks?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622281#M76432</link>
      <description>&lt;P&gt;Thank you for such a prompt suggestion! Gave it a try but it's still considering those blanks (hid them in the filters in this example)&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>Wed, 06 Jul 2022 14:45:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622281#M76432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of row total excluding blanks?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622318#M76435</link>
      <description>&lt;P&gt;Two approaches can solve this:&lt;/P&gt;
&lt;P&gt;1. Assuming you filter out \ slice out the blank BMI&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;% In Population = 

    DIVIDE (
        COUNT ( 'Fact Table'[PersonKey] ),
        CALCULATE (
            COUNT ( 'Fact Table'[PersonKey] ),
            ALLSELECTED('Measurement Details'[BMI Category])
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Assuming you don't manually filter out anything:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE (
    DIVIDE (
        COUNT ( 'Fact Table'[PersonKey] ),
        CALCULATE (
            COUNT ( 'Fact Table'[PersonKey] ),
            REMOVEFILTERS ('Measurement Details'[BMI Category]  ),
            KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
        )
    ),
    KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 11:19:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622318#M76435</guid>
      <dc:creator>rbriga</dc:creator>
      <dc:date>2022-07-06T11:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage of row total excluding blanks?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622393#M76439</link>
      <description>&lt;P&gt;ALLSELECTED worked an absolute treat. Thank you so much!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The section option didn't want to work for me, but I found tweaking it to the following did - sharing in case this helps anymore else&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Pupil % = CALCULATE (
    DIVIDE (
        COUNT ( 'Fact Table'[PersonKey] ),
        CALCULATE (
            COUNT ( 'Fact Table'[PersonKey] ),
            REMOVEFILTERS ('Measurement Details'[BMI Category]  ),
            KEEPFILTERS ('Measurement Details'[BMI Category] &amp;lt;&amp;gt;BLANK()) 
        )
    ),
    KEEPFILTERS ('Measurement Details'[BMI Category] &amp;lt;&amp;gt;BLANK())
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 06 Jul 2022 14:39:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-of-row-total-excluding-blanks/m-p/2622393#M76439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T14:39:26Z</dc:date>
    </item>
  </channel>
</rss>

