<?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 Need help to track changes in Future Orders fall down in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-track-changes-in-Future-Orders-fall-down/m-p/4118973#M163527</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Power BI report connected to SQL, and I’m looking to track changes in one of the live tables.&lt;/P&gt;&lt;P&gt;The Order table contains future orders, and I want to monitor the Fall Down percentage.&lt;/P&gt;&lt;P&gt;Is there a way to create a static table &amp;nbsp;with a daily timestamp to count the number of orders per Customer for the current month for each day?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2024 15:43:37 GMT</pubDate>
    <dc:creator>Ozzyabusinni</dc:creator>
    <dc:date>2024-08-26T15:43:37Z</dc:date>
    <item>
      <title>Need help to track changes in Future Orders fall down</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-track-changes-in-Future-Orders-fall-down/m-p/4118973#M163527</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Power BI report connected to SQL, and I’m looking to track changes in one of the live tables.&lt;/P&gt;&lt;P&gt;The Order table contains future orders, and I want to monitor the Fall Down percentage.&lt;/P&gt;&lt;P&gt;Is there a way to create a static table &amp;nbsp;with a daily timestamp to count the number of orders per Customer for the current month for each day?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the help!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 15:43:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-track-changes-in-Future-Orders-fall-down/m-p/4118973#M163527</guid>
      <dc:creator>Ozzyabusinni</dc:creator>
      <dc:date>2024-08-26T15:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to track changes in Future Orders fall down</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-track-changes-in-Future-Orders-fall-down/m-p/4118982#M163529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="671230" data-lia-user-login="Ozzyabusinni" class="lia-mention lia-mention-user"&gt;Ozzyabusinni&lt;/a&gt;,&amp;nbsp;give this a try, and if you encounter any issues, let me know.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create a Date Table: Ensure a Date table exists for the current month.&lt;/P&gt;&lt;P&gt;Capture Daily Snapshot: Use a SQL job or Power Automate to insert daily order counts into a new SQL table with a timestamp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create Static Table in SQL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE TABLE OrderSnapshot (
    SnapshotDate DATE,
    CustomerID INT,
    OrderCount INT
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Insert daily counts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;INSERT INTO OrderSnapshot (SnapshotDate, CustomerID, OrderCount)
SELECT GETDATE(), CustomerID, COUNT(OrderID)
FROM Orders
WHERE OrderDate &amp;gt;= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
GROUP BY CustomerID;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculate Fall Down Percentage in Power BI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FallDownPercentage = 
VAR PreviousDayOrderCount = 
    CALCULATE(SUM(OrderSnapshot[OrderCount]), 
    FILTER(OrderSnapshot, OrderSnapshot[SnapshotDate] = TODAY()-1))

VAR CurrentDayOrderCount = 
    SUM(OrderSnapshot[OrderCount])

RETURN 
    IF(PreviousDayOrderCount &amp;gt; 0,
        DIVIDE(CurrentDayOrderCount - PreviousDayOrderCount, PreviousDayOrderCount, 0),
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="center"&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Did I answer your question?&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;If so, please mark my post as the solution!&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Your Kudos are much appreciated!&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Proud to be a Responsive Resident!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 15:52:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-track-changes-in-Future-Orders-fall-down/m-p/4118982#M163529</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-26T15:52:56Z</dc:date>
    </item>
  </channel>
</rss>

