<?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 Simple cumulative sum issue with live data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Simple-cumulative-sum-issue-with-live-data/m-p/3417945#M129352</link>
    <description>&lt;P&gt;I have a live streaming dataset in the service and a report in desktop that direct queries that dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset has an order_datetime and order_qty field and some other dimensions (in one big table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cumulative = calculate(sum(order_qty),filter(all(mytable),order_datetime&amp;lt;=max(order_datetime)))&lt;/LI-CODE&gt;&lt;P&gt;I create a table visual showing order_datetime and order_qty and my measure.&lt;/P&gt;&lt;P&gt;All is good ... every row where there is an order_qty I see the cumulative increase by that number.&amp;nbsp; Here is datetime, cmulative and qty:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I change the measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cumulative = calculate(sum(order_qty),filter(allselected(mytable),order_datetime&amp;lt;=max(order_datetime)))&lt;/LI-CODE&gt;&lt;P&gt;because I want other slicers on the report, slicing other dimensions of the order, to affect this cumulative total.&amp;nbsp; I apply a filter on the visual for order_datetime on or after midnight today and now here is datetime, cmulative and qty:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;All is bad!&amp;nbsp; Only some rows in the table of orders cause the cumulative to increase.&amp;nbsp; All the slicers are set to select all and no other visual or page filters other than the date; and I can't see any commonality between the rows that &lt;EM&gt;do&lt;/EM&gt; cause the cumulative to increase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm probably doing something completely obvious to you guys but I can't figure it at all! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 14:33:32 GMT</pubDate>
    <dc:creator>JasonWelch</dc:creator>
    <dc:date>2023-09-06T14:33:32Z</dc:date>
    <item>
      <title>Simple cumulative sum issue with live data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Simple-cumulative-sum-issue-with-live-data/m-p/3417945#M129352</link>
      <description>&lt;P&gt;I have a live streaming dataset in the service and a report in desktop that direct queries that dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset has an order_datetime and order_qty field and some other dimensions (in one big table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cumulative = calculate(sum(order_qty),filter(all(mytable),order_datetime&amp;lt;=max(order_datetime)))&lt;/LI-CODE&gt;&lt;P&gt;I create a table visual showing order_datetime and order_qty and my measure.&lt;/P&gt;&lt;P&gt;All is good ... every row where there is an order_qty I see the cumulative increase by that number.&amp;nbsp; Here is datetime, cmulative and qty:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I change the measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cumulative = calculate(sum(order_qty),filter(allselected(mytable),order_datetime&amp;lt;=max(order_datetime)))&lt;/LI-CODE&gt;&lt;P&gt;because I want other slicers on the report, slicing other dimensions of the order, to affect this cumulative total.&amp;nbsp; I apply a filter on the visual for order_datetime on or after midnight today and now here is datetime, cmulative and qty:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;All is bad!&amp;nbsp; Only some rows in the table of orders cause the cumulative to increase.&amp;nbsp; All the slicers are set to select all and no other visual or page filters other than the date; and I can't see any commonality between the rows that &lt;EM&gt;do&lt;/EM&gt; cause the cumulative to increase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm probably doing something completely obvious to you guys but I can't figure it at all! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 14:33:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Simple-cumulative-sum-issue-with-live-data/m-p/3417945#M129352</guid>
      <dc:creator>JasonWelch</dc:creator>
      <dc:date>2023-09-06T14:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple cumulative sum issue with live data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Simple-cumulative-sum-issue-with-live-data/m-p/3421160#M129516</link>
      <description>&lt;P&gt;So, in case anyone gets here in the future ... I suspected this was a data type issue and this is what I did ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I exported my data to Excel and made a new report off the Excel file in which, of course, the measures work as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On loading the Excel file, BI transforms my datetime column to datetime in M, like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and it looks like a datetime in the canvas&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and it builds a date hierarchy off it in the Data pane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the live version, it claims to believe it's a (greyed-out) datetime but doesn't create the hierarchy (or prompt you with dot-notation when creating measures off it) ...&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CONCLUSION:&amp;nbsp; in the live version the measures don't work because it's not quite treating that field as a datetime somehow, even though it says it is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: the incoming data is a datetime from stream analytics - as it's end-to-end MS stuff I'm going to ask them!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 08:53:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Simple-cumulative-sum-issue-with-live-data/m-p/3421160#M129516</guid>
      <dc:creator>JasonWelch</dc:creator>
      <dc:date>2023-09-08T08:53:43Z</dc:date>
    </item>
  </channel>
</rss>

