<?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: Need Help with DAX 2-Day Lag Formula return different data sources based on future vs. past in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3409700#M128863</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610978" data-lia-user-login="afree" class="lia-mention lia-mention-user"&gt;afree&lt;/a&gt;&amp;nbsp;I am courious, isn't&amp;nbsp;&lt;SPAN&gt;YESTERDAY already less than TODAY? So you only need reference to &amp;lt;TODAY and second scenario &amp;gt;TODAY. Hope this help&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 20:10:28 GMT</pubDate>
    <dc:creator>some_bih</dc:creator>
    <dc:date>2023-08-31T20:10:28Z</dc:date>
    <item>
      <title>Need Help with DAX 2-Day Lag Formula return different data sources based on future vs. past</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3409019#M128827</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a DAX formula that will return hours depending on the day. Please help! I am very stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For past dates before TODAY and YESTERDAY, I want to return the data from "Actual Hours" measure/column.&lt;/P&gt;&lt;P&gt;For TODAY, YESTERDAY and FUTURE DAYS, I want to return the data from "Scheduled Hours" measure/column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using the below formula but it is not bringing in "Scheduled Hours" for today and future. The hours return for past dates before Yesterday and Today are incorrect. I am comparing this data in a table matrix by bringing in Actual Hours and Scheduled Hours side by side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt; Day Lag Hours =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Tables- Dates'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;() - &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Actual Hours]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;//Past: Actual Hours Measure&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;[STAR Scheduled Hours]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;//Today and Yesterday: Scheduled Hours Measure&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;[STAR Scheduled Hours]&lt;/SPAN&gt; &lt;SPAN&gt;//Future: Scheduled Hours Measure&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Aug 2023 13:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3409019#M128827</guid>
      <dc:creator>afree</dc:creator>
      <dc:date>2023-08-31T13:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with DAX 2-Day Lag Formula return different data sources based on future vs. past</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3409700#M128863</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="610978" data-lia-user-login="afree" class="lia-mention lia-mention-user"&gt;afree&lt;/a&gt;&amp;nbsp;I am courious, isn't&amp;nbsp;&lt;SPAN&gt;YESTERDAY already less than TODAY? So you only need reference to &amp;lt;TODAY and second scenario &amp;gt;TODAY. Hope this help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 20:10:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3409700#M128863</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-08-31T20:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with DAX 2-Day Lag Formula return different data sources based on future vs. past</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3444594#M130978</link>
      <description>&lt;P&gt;I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.&lt;/P&gt;
&lt;P&gt;Your insights and updates will greatly assist others who might be encountering the same challenge.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 08:09:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-DAX-2-Day-Lag-Formula-return-different-data/m-p/3444594#M130978</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-24T08:09:15Z</dc:date>
    </item>
  </channel>
</rss>

