<?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: Running total/ cumulative sum measure not responding to some slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259574#M20920</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt; Oh my goodness, I can't believe it was that simple. I've spent hours looking at this. I find DAX commands quite unintuitive so never really know what to try. It works now, thank you so much that's made my day!&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jul 2020 15:09:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-07-29T15:09:42Z</dc:date>
    <item>
      <title>Running total/ cumulative sum measure not responding to some slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259553#M20916</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m pretty new to Power BI and DAX and I’m having some strange behaviour with some measures that I’ve calculated. It will take a bit of space to explain this, but I’d *really* appreciate any help as I’ve been racking my brains over this for days and I can’t solve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table that contains member information for a card scheme. I have a few measures that I’m interested in that need to be created, the main ones being:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The number of new members per quarter&lt;/LI&gt;&lt;LI&gt;The running count/cumulative total in each quarter&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My problem is that my running count measure responds weirdly to slicers – it will recalculate as it should for some slicers, but not for others. I think it might be something to do with the relationships between data tables, but not sure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code for my measures:&lt;/P&gt;&lt;P&gt;1) New members:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;N of Members = COUNT('Members'[MembershipNumber])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Running count&lt;/P&gt;&lt;P&gt;This is where things get a bit complicated -- although I’m calculating the running total by quarter, the data type for 'quarter' can’t be set as a date because the column is a text string that concatenates year + quarter, which allows me to plot data for all quarters over multiple years. Instead, I’ve created an index for the quarters that orders them (e.g. Q1-2019 has an index of 1, Q2-2019 has an index of 2, etc.) and used that index to calculate my running total.&lt;/P&gt;&lt;P&gt;So I have a column ‘Year-Qtr’ in my members data, and then a column for the index ‘Qtr_index_no’ in another data table that gives the index for each quarter. Then I’ve used this code to calculate the running total:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Running Count = 
    VAR MaxIndex = MAX( 'TargetMemberships'[Qtr_index_no] )
    RETURN
        CALCULATE(
            COUNT('Members'[MembershipNumber]),
            'TargetMemberships'[Qtr_index_no] &amp;lt;= MaxIndex,
            ALL('Members')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works and this is my output with the two measures:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The problem is with the running count when I want to apply slicers. I have 3 slicers that I want to apply (postcode, gender, and deprivation decile). Gender is a column from the same data table as the members data, but Postcode and Deprivation Decile are columns from different data tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment the running count recalculates as it should when I change the postcode:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I want to filter based on Gender or Deprivation Decile, it doesn’t recalculate, but just shows the grand running totals as if no filters were applied:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it responds to the postcode slicer because of the way the relationships are set up, but I don’t know why. The postcode data are in a data table that isn’t directly linked to the Members data, whereas the others are directly linked. The relationships look like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know why this is happening and what I can do to make it so that the running total recalculates correctly for all slicers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the length of the post, but I wanted to try to explain the problem as clearly as possible! I'd massively appreciate any help! Thanks very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 14:57:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259553#M20916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-29T14:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running total/ cumulative sum measure not responding to some slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259559#M20918</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;- It probably has to do with your ALL statement. Try replacing that with an ALLEXCEPT that respects your slicer columns.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:00:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259559#M20918</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-07-29T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Running total/ cumulative sum measure not responding to some slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259574#M20920</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt; Oh my goodness, I can't believe it was that simple. I've spent hours looking at this. I find DAX commands quite unintuitive so never really know what to try. It works now, thank you so much that's made my day!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:09:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-total-cumulative-sum-measure-not-responding-to-some/m-p/1259574#M20920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-29T15:09:42Z</dc:date>
    </item>
  </channel>
</rss>

