<?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 How to incorporate Forecast LAG into data model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-incorporate-Forecast-LAG-into-data-model/m-p/3154326#M156772</link>
    <description>&lt;P&gt;Hi experts!&lt;/P&gt;
&lt;P&gt;I am working on a MAPE Report for our Forecast Accurary Report.&lt;/P&gt;
&lt;P&gt;In this report we have 4 tables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actuals for the past&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Date&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Value&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Article&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;5&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;6&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I have a fiscal calendar table and a master data table that helps me to aggregate this data for specific months and article groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I have a forecasting table like this:&lt;/P&gt;
&lt;TABLE border="1" width="64%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;Cycle (Year-Month)&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Date&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Value&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Article&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-01&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;5&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-01&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;6&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-02&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;7&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I would like to add a filter for the LAG into the report based on this logic:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If I select 0, I would like to see the actuals for the individual month vs the forecast for that same month based on previous cycle numbers&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;For instance
&lt;UL&gt;
&lt;LI&gt;We are in March 2023&lt;/LI&gt;
&lt;LI&gt;Then I would like to see the actuals for Feb 2023 vs the forecast of 2023-02&lt;/LI&gt;
&lt;LI&gt;I would like to see the actuals for Jan 2023 vs the forecast of 2023-01&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;If I select 1 then I would like to the forecast 2 cycles before.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you build that kind of logic into the model?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Any new kind of table?&lt;/LI&gt;
&lt;LI&gt;What kind of measures?&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Sun, 26 Mar 2023 12:21:10 GMT</pubDate>
    <dc:creator>joshua1990</dc:creator>
    <dc:date>2023-03-26T12:21:10Z</dc:date>
    <item>
      <title>How to incorporate Forecast LAG into data model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-incorporate-Forecast-LAG-into-data-model/m-p/3154326#M156772</link>
      <description>&lt;P&gt;Hi experts!&lt;/P&gt;
&lt;P&gt;I am working on a MAPE Report for our Forecast Accurary Report.&lt;/P&gt;
&lt;P&gt;In this report we have 4 tables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actuals for the past&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Date&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Value&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;Article&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;5&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;6&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="30px"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I have a fiscal calendar table and a master data table that helps me to aggregate this data for specific months and article groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I have a forecasting table like this:&lt;/P&gt;
&lt;TABLE border="1" width="64%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;Cycle (Year-Month)&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Date&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Value&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;Article&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-01&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;5&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-01&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;6&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;2021-02&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;DD.MM.YYYY&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;7&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I would like to add a filter for the LAG into the report based on this logic:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If I select 0, I would like to see the actuals for the individual month vs the forecast for that same month based on previous cycle numbers&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;For instance
&lt;UL&gt;
&lt;LI&gt;We are in March 2023&lt;/LI&gt;
&lt;LI&gt;Then I would like to see the actuals for Feb 2023 vs the forecast of 2023-02&lt;/LI&gt;
&lt;LI&gt;I would like to see the actuals for Jan 2023 vs the forecast of 2023-01&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;If I select 1 then I would like to the forecast 2 cycles before.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How would you build that kind of logic into the model?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Any new kind of table?&lt;/LI&gt;
&lt;LI&gt;What kind of measures?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 26 Mar 2023 12:21:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-incorporate-Forecast-LAG-into-data-model/m-p/3154326#M156772</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2023-03-26T12:21:10Z</dc:date>
    </item>
  </channel>
</rss>

