<?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: Cumulative Sum with filter in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668681#M321663</link>
    <description>&lt;P&gt;Relationship is between 'Table'[Date] and 'Date'[Date] and has to stay that way?&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2019 12:14:56 GMT</pubDate>
    <dc:creator>tex628</dc:creator>
    <dc:date>2019-04-12T12:14:56Z</dc:date>
    <item>
      <title>Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668639#M321636</link>
      <description>&lt;P&gt;I am trying to do a cumulative measure to add to a chart, however becuase my data structure consist of stacked monthly reports if I do so using the below code I end up with summing over repeated instances as each ID appears more than once, therefore I need to filter on the most recent report date - how would I adapt the code below to reflect this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Cumulative Quantity :=
CALCULATE (
    SUM ( Transactions[Quantity] ),
    FILTER (
        ALL ( 'Date'[Date] ),
        'Date'[Date] &amp;lt;= MAX ( 'Date'[Date] )
    )
)&lt;/PRE&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;</description>
      <pubDate>Fri, 12 Apr 2019 11:13:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668639#M321636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T11:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668649#M321641</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;Cumulative Quantity :=
VAR Mdate = MAX ( 'Date'[Date] )
Return
CALCULATE (
    SUM ( Transactions[Quantity] ),
    FILTER (
        ALL ( 'Date'[Date] ),
        'Date'[Date] &amp;lt;= Mdate    )
)&lt;/PRE&gt;&lt;PRE&gt;Br,&lt;BR /&gt;Johannes&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 11:33:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668649#M321641</guid>
      <dc:creator>tex628</dc:creator>
      <dc:date>2019-04-12T11:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668666#M321653</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32447" data-lia-user-login="tex628" class="lia-mention lia-mention-user"&gt;tex628&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure this will work as the stack reports have the same date line duplicated in each - I have a column [report date] that I want to filter to be the max. I have included some sample data below, where the aim is to get the cumulative for each month for the April Report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Report Date&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-19&lt;/TD&gt;&lt;TD&gt;01/01/2019&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan-19&lt;/TD&gt;&lt;TD&gt;01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D&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/01/2019&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/02/2019&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/03/2019&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/04/2019&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 11:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668666#M321653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T11:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668671#M321656</link>
      <description>&lt;P&gt;Can you convert the report date column into a proper date column and use that instead?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Jan-19 to 01/01/19&lt;BR /&gt;Feb-19 to 01/02/19&lt;BR /&gt;Etc...&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:00:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668671#M321656</guid>
      <dc:creator>tex628</dc:creator>
      <dc:date>2019-04-12T12:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668678#M321661</link>
      <description>&lt;P&gt;Yes it is in the date format already.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:10:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668678#M321661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T12:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668681#M321663</link>
      <description>&lt;P&gt;Relationship is between 'Table'[Date] and 'Date'[Date] and has to stay that way?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:14:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668681#M321663</guid>
      <dc:creator>tex628</dc:creator>
      <dc:date>2019-04-12T12:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668690#M321671</link>
      <description>&lt;P&gt;I'm not sure I follow? I don't think the relationship matters.&lt;BR /&gt;&lt;BR /&gt;Below is an example of where I hope to get to using the above data, the cumulative for the latest report (Apr-19), as a measure not column.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Report Date&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;TD&gt;Cumulative&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/01/2019&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/02/2019&lt;/TD&gt;&lt;TD&gt;900&lt;/TD&gt;&lt;TD&gt;1400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/03/2019&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;1600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr-19&lt;/TD&gt;&lt;TD&gt;01/04/2019&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;1800&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:29:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668690#M321671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-12T12:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668699#M321676</link>
      <description>&lt;P&gt;Ohh now I understand! Try this! :-)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Cumulative Quantity :=
VAR _date = SELECTEDVALUE('Table'[Date] )&lt;BR /&gt;VAR _period = SELECTEDVALUE('Table'[Report Date])
Return
CALCULATE (
    SUM ( Transactions[Quantity] ),
        ALL ( 'Table' ),
        'Table'[Date] &amp;lt;= _date,&lt;BR /&gt;	'Table'[Report Date] = _period&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 12:45:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Cumulative-Sum-with-filter/m-p/668699#M321676</guid>
      <dc:creator>tex628</dc:creator>
      <dc:date>2019-04-12T12:45:17Z</dc:date>
    </item>
  </channel>
</rss>

