<?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 Filter out but grand total should not be affected. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2910413#M95099</link>
    <description>&lt;P&gt;I have an original table as below -&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;but I want to filter out countries with participants less than 5. Hence when i apply filter I get the following matrix -&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, I want total as &lt;STRONG&gt;13&lt;/STRONG&gt; only. How do I make my "total" in the matrix universal (should not be affected by filter) but at the same time, I should be able to filter out specific countries ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2022 18:57:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-11-16T18:57:17Z</dc:date>
    <item>
      <title>Filter out but grand total should not be affected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2910413#M95099</link>
      <description>&lt;P&gt;I have an original table as below -&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;but I want to filter out countries with participants less than 5. Hence when i apply filter I get the following matrix -&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, I want total as &lt;STRONG&gt;13&lt;/STRONG&gt; only. How do I make my "total" in the matrix universal (should not be affected by filter) but at the same time, I should be able to filter out specific countries ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 18:57:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2910413#M95099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-16T18:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter out but grand total should not be affected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2910581#M95106</link>
      <description>&lt;P&gt;I wouldn't do that if I were you. This will be highly confusing to the users. Instead, create 2 measures with good names. One should work normally (i.e., sum up as usual and maybe filter the countries), the other one can be funky. But having a total that does something different than what one would expect... well, that's risky and will trigger a lot of questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The measure you're looking for is something like this:&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;[# Participants] =
var CountOfVisibleCountries = COUNTROWS( RelevantDimension[Country] )
var Result =
    SUMX(
        DISTINCT( RelevantDimension[Country] ),
        var CountOfParticipants = [measure to calculate participants as usual]
        var Result = 
            CountOfParticipants * ( CountOfVisibleCountries &amp;gt; 1 )
            + CountOfParticipants 
                * ( CountOfParticipants &amp;gt;= 5 )
                * ( CountOfVisibleCountries = 1 )
        Return
            if( Result, Result )
    )
return
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 16 Nov 2022 20:29:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2910581#M95106</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-11-16T20:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Filter out but grand total should not be affected.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2911114#M95128</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want&amp;nbsp; to "Filter out but grand total should not be affected". Right?&lt;/P&gt;
&lt;P&gt;Here are the steps you can refer to :&lt;BR /&gt;(1)This is&amp;nbsp; my test data :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2)We can create a measure :&lt;/P&gt;
&lt;P&gt;Measure = IF(HASONEVALUE('Table'[Country]),SUM('Table'[Participants]), CALCULATE( SUM('Table'[Participants]),ALL('Table')))&lt;/P&gt;
&lt;P&gt;(3)Then we can filter the measure &amp;lt;5 and then we can meet your need :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it as the solution&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 02:05:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-out-but-grand-total-should-not-be-affected/m-p/2911114#M95128</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-11-17T02:05:46Z</dc:date>
    </item>
  </channel>
</rss>

