<?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 Filtering issue when getting cumulative total with dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-issue-when-getting-cumulative-total-with-dax/m-p/2215765#M52449</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm trying to prepare a Power Bi report in which I contrast two products with each other. I'm working on contrasting subtarrıtories which made up %80 off sales of both of the products. For that, at first I've made a Measure which is the cumulative total of the two products. Afterwards I'm trying to filter this products with a Measure I've made. But when I filter common subtarrıtories cumulative, The Measure works again. I don't want this filter to effect cumulative Measure. Can you help me with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pbix: &lt;A href="https://drive.google.com/file/d/1RiYp0mmmVOGPA7Yn1QiDzDMi39fkTAf1/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1RiYp0mmmVOGPA7Yn1QiDzDMi39fkTAf1/view?usp=sharing&lt;/A&gt;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the DAX of the Cumulative Total Measure I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cumulative Total Urun1 = CALCULATE(
    SUM( 'Produts 1'[SUM UNITS 1] ),
    FILTER( ALLSELECTED( 'Produts 1' ),
        'Produts 1'[Ranking 1] &amp;lt;= MAX( 'Produts 1'[Ranking 1] )
    ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SinceI was thinking about adding many different types of filter, I've protected all the filters in Allselecteds Products1 table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Dax of the Filter Measure that I used is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;İlk80 f = IF(
    HASONEVALUE('%80 Table'[Value]),
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0 || 'Measure-'[Cumulative Percent 2] &amp;gt;0,
    IF(VALUE('%80 Table'[Value Measure])=0, 
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0 || 'Measure-'[Cumulative Percent 2] &amp;gt;0 ,1,BLANK() ),
    IF(VALUE('%80 Table'[Value Measure])=1, 
    IF('Measure-'[Cumulative Percent 1]&amp;lt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;lt;0.8 ,1,BLANK()  ),
    if(VALUE('%80 Table'[Value Measure])=2,
    IF('Measure-'[Cumulative Percent 1]&amp;lt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;gt;0.8 ,1,BLANK()  ),
    if(VALUE('%80 Table'[Value Measure])=3,
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;lt;0.8 ,1,BLANK()  ),
    IF(VALUE('%80 Table'[Value Measure])=4, 
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;gt;0.8 ,1,BLANK()  )
    ))))),BLANK() ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 09:09:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-01T09:09:37Z</dc:date>
    <item>
      <title>Filtering issue when getting cumulative total with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-issue-when-getting-cumulative-total-with-dax/m-p/2215765#M52449</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm trying to prepare a Power Bi report in which I contrast two products with each other. I'm working on contrasting subtarrıtories which made up %80 off sales of both of the products. For that, at first I've made a Measure which is the cumulative total of the two products. Afterwards I'm trying to filter this products with a Measure I've made. But when I filter common subtarrıtories cumulative, The Measure works again. I don't want this filter to effect cumulative Measure. Can you help me with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pbix: &lt;A href="https://drive.google.com/file/d/1RiYp0mmmVOGPA7Yn1QiDzDMi39fkTAf1/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1RiYp0mmmVOGPA7Yn1QiDzDMi39fkTAf1/view?usp=sharing&lt;/A&gt;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the DAX of the Cumulative Total Measure I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cumulative Total Urun1 = CALCULATE(
    SUM( 'Produts 1'[SUM UNITS 1] ),
    FILTER( ALLSELECTED( 'Produts 1' ),
        'Produts 1'[Ranking 1] &amp;lt;= MAX( 'Produts 1'[Ranking 1] )
    ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SinceI was thinking about adding many different types of filter, I've protected all the filters in Allselecteds Products1 table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Dax of the Filter Measure that I used is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;İlk80 f = IF(
    HASONEVALUE('%80 Table'[Value]),
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0 || 'Measure-'[Cumulative Percent 2] &amp;gt;0,
    IF(VALUE('%80 Table'[Value Measure])=0, 
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0 || 'Measure-'[Cumulative Percent 2] &amp;gt;0 ,1,BLANK() ),
    IF(VALUE('%80 Table'[Value Measure])=1, 
    IF('Measure-'[Cumulative Percent 1]&amp;lt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;lt;0.8 ,1,BLANK()  ),
    if(VALUE('%80 Table'[Value Measure])=2,
    IF('Measure-'[Cumulative Percent 1]&amp;lt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;gt;0.8 ,1,BLANK()  ),
    if(VALUE('%80 Table'[Value Measure])=3,
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;lt;0.8 ,1,BLANK()  ),
    IF(VALUE('%80 Table'[Value Measure])=4, 
    IF('Measure-'[Cumulative Percent 1]&amp;gt;0.8 &amp;amp;&amp;amp; 'Measure-'[Cumulative Percent 2] &amp;gt;0.8 ,1,BLANK()  )
    ))))),BLANK() ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 09:09:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-issue-when-getting-cumulative-total-with-dax/m-p/2215765#M52449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T09:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering issue when getting cumulative total with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-issue-when-getting-cumulative-total-with-dax/m-p/2221890#M52793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your picture is not very clear. Is the second one the result you want?&lt;/P&gt;
&lt;P&gt;When you filter, you do not want the&amp;nbsp;&lt;SPAN&gt;cumulative total change?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please consider to selected show items with no data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Maybe your dax can change to this. I have changed your measure [80%] in your pbix in order to match 80%table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;İlk80 f =
IF(
    SELECTEDVALUE( '%80 Table'[Condition] ) = "All"
        || ISFILTERED( '%80 Table'[Condition] ) = FALSE(),
    1,
    IF( SELECTEDVALUE( '%80 Table'[Condition] ) = [%80], 1, BLANK() )
)
&lt;/LI-CODE&gt;
&lt;P&gt;result:&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;
&lt;P&gt;Pbix in the end you can refer, if i misunderstood you, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 01:28:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-issue-when-getting-cumulative-total-with-dax/m-p/2221890#M52793</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2021-12-15T01:28:12Z</dc:date>
    </item>
  </channel>
</rss>

