<?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: Load previous data even when no rows exist in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4017521#M158408</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="430551" data-lia-user-login="smparnon" class="lia-mention lia-mention-user"&gt;smparnon&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try to use LOOKUPVALUE DAX to modify the formula to the following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RASI GDMT Adjusted = 
VAR SelectedEndDate = MAX(Overall[Flowsheet Recorded Date])
VAR FirstRecordDate = MIN(Overall[MostRecentACE/ARB/ARNIDate])
VAR LastAvailableDate = CALCULATE(MAX(Overall[MostRecentACE/ARB/ARNIDate]), ALL(Overall))
VAR AdjustedEndDate = IF(SelectedEndDate &amp;gt; LastAvailableDate, LastAvailableDate, SelectedEndDate)
VAR CountTillLastAvailable = 
    IF(
        SelectedEndDate &amp;lt; FirstRecordDate,
        BLANK(),
        CALCULATE(
            COUNTROWS(
                SUMMARIZE(
                    FILTER(
                        Overall,
                        (Overall[MostRecentACE/ARB/ARNIValue] = "max tolerated" || Overall[MostRecentACE/ARB/ARNIValue] = "Target dose") &amp;amp;&amp;amp;
                        Overall[MostRecentACE/ARB/ARNIDate] &amp;lt;= AdjustedEndDate
                    ),
                    Overall[patient name and epic id]
                )
            ),
            ALLSELECTED(Overall)
        )
    )
RETURN
IF(ISBLANK(CountTillLastAvailable), LOOKUPVALUE([column name], [Flowsheet Recorded Date], LASTDATE(Overall[Flowsheet Recorded Date])), CountTillLastAvailable)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax" target="_blank" rel="noopener"&gt;LOOKUPVALUE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lastdate-function-dax" target="_blank"&gt;LASTDATE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Previous-Value-Using-DAX/m-p/933746" target="_blank"&gt;Solved: Previous Value Using DAX - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 02:34:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-07-01T02:34:01Z</dc:date>
    <item>
      <title>Load previous data even when no rows exist</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4015899#M158274</link>
      <description />
      <pubDate>Fri, 23 Aug 2024 15:50:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4015899#M158274</guid>
      <dc:creator>smparnon</dc:creator>
      <dc:date>2024-08-23T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load previous data even when no rows exist</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4017344#M158391</link>
      <description>&lt;P&gt;To report on things that are not there you need to use disconnected tables and/or crossjoins&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 22:40:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4017344#M158391</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-30T22:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load previous data even when no rows exist</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4017521#M158408</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="430551" data-lia-user-login="smparnon" class="lia-mention lia-mention-user"&gt;smparnon&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try to use LOOKUPVALUE DAX to modify the formula to the following.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RASI GDMT Adjusted = 
VAR SelectedEndDate = MAX(Overall[Flowsheet Recorded Date])
VAR FirstRecordDate = MIN(Overall[MostRecentACE/ARB/ARNIDate])
VAR LastAvailableDate = CALCULATE(MAX(Overall[MostRecentACE/ARB/ARNIDate]), ALL(Overall))
VAR AdjustedEndDate = IF(SelectedEndDate &amp;gt; LastAvailableDate, LastAvailableDate, SelectedEndDate)
VAR CountTillLastAvailable = 
    IF(
        SelectedEndDate &amp;lt; FirstRecordDate,
        BLANK(),
        CALCULATE(
            COUNTROWS(
                SUMMARIZE(
                    FILTER(
                        Overall,
                        (Overall[MostRecentACE/ARB/ARNIValue] = "max tolerated" || Overall[MostRecentACE/ARB/ARNIValue] = "Target dose") &amp;amp;&amp;amp;
                        Overall[MostRecentACE/ARB/ARNIDate] &amp;lt;= AdjustedEndDate
                    ),
                    Overall[patient name and epic id]
                )
            ),
            ALLSELECTED(Overall)
        )
    )
RETURN
IF(ISBLANK(CountTillLastAvailable), LOOKUPVALUE([column name], [Flowsheet Recorded Date], LASTDATE(Overall[Flowsheet Recorded Date])), CountTillLastAvailable)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax" target="_blank" rel="noopener"&gt;LOOKUPVALUE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lastdate-function-dax" target="_blank"&gt;LASTDATE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Previous-Value-Using-DAX/m-p/933746" target="_blank"&gt;Solved: Previous Value Using DAX - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 02:34:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Load-previous-data-even-when-no-rows-exist/m-p/4017521#M158408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-01T02:34:01Z</dc:date>
    </item>
  </channel>
</rss>

