<?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: Show previous date data on matrix table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4285098#M170080</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="363620" data-lia-user-login="nbufff" class="lia-mention lia-mention-user"&gt;nbufff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can produce your required output by writing a dax measure like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date_Diff = 
VAR StartDate = DATE(2024, 11, 1)  -- Starting point
VAR CurrentDate = SELECTEDVALUE(Calendar[Date])
RETURN
IF(
    CurrentDate &amp;gt;= StartDate,
    CALCULATE(
        COUNTROWS('Calendar'),
        FILTER(
            ALL('Calendar'),
            Calendar[Date] &amp;gt;= StartDate &amp;amp;&amp;amp;
            Calendar[Date] &amp;lt;= CurrentDate &amp;amp;&amp;amp;
            Calendar[IsWorkingDay] = 1
        )
    ),
    BLANK()  -- If the date is before November 1, return blank
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The resulting output is shown below. I've transposed the visualization to save space.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached an example pbix file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 03:20:31 GMT</pubDate>
    <dc:creator>DataNinja777</dc:creator>
    <dc:date>2024-11-15T03:20:31Z</dc:date>
    <item>
      <title>Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284010#M170030</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;I stuck on issue how to show previous date data on matrix table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made matrix table showing qty each day from plant A and B. I want to make it as&amp;nbsp; showing in&amp;nbsp; second picture with high-lighting the part in yellow.&amp;nbsp; Basically 11/3 is missing so it needs to be added by using the data from 11/2.&amp;nbsp; Also Plant A 11/6 qty should be from 11/5 and plant B 11/2 data to be from 11/1. How can we make it? Thanks for help!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 12:46:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284010#M170030</guid>
      <dc:creator>nbufff</dc:creator>
      <dc:date>2024-11-14T12:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284066#M170032</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Including Missing Dates =
COALESCE (
    [Base Measure],
    VAR MaxDate =
        MAX ( 'Date'[Date] )
    VAR Result =
        LASTNONBLANKVALUE (
            FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] &amp;lt; MaxDate ),
            [Base Measure]
        )
    RETURN
        Result
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:33:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284066#M170032</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-14T13:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284085#M170033</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="363620" data-lia-user-login="nbufff" class="lia-mention lia-mention-user"&gt;nbufff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can produce your required output by writing a dax measure like below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CarryOverQty = 
VAR CurrentDate = SELECTEDVALUE(Calendar[Date])
VAR PreviousQty =
    CALCULATE(
        MAXX(
            FILTER(
                ALL('Calendar'),
                Calendar[Date] &amp;lt; CurrentDate &amp;amp;&amp;amp; NOT(ISBLANK([Quantity]))
            ),
            [Quantity]
        )
    )
RETURN
IF(
    ISBLANK([Quantity]),
    PreviousQty,
    [Quantity]
)
&lt;/LI-CODE&gt;
&lt;P&gt;The data model will look like below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The resulting output will look like as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I have attached an example pbix file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:45:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284085#M170033</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-11-14T13:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284287#M170038</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;, It works but the situation here little bit complex.&lt;/P&gt;&lt;P&gt;we need to by pass the holdaiy and get the date difference between working days.&lt;/P&gt;&lt;P&gt;e.g. we don't need to show Nov.2 and Nov.3 but we need to show working day difference from Nov.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;thank for advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4284287#M170038</guid>
      <dc:creator>nbufff</dc:creator>
      <dc:date>2024-11-14T15:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4285098#M170080</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="363620" data-lia-user-login="nbufff" class="lia-mention lia-mention-user"&gt;nbufff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can produce your required output by writing a dax measure like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date_Diff = 
VAR StartDate = DATE(2024, 11, 1)  -- Starting point
VAR CurrentDate = SELECTEDVALUE(Calendar[Date])
RETURN
IF(
    CurrentDate &amp;gt;= StartDate,
    CALCULATE(
        COUNTROWS('Calendar'),
        FILTER(
            ALL('Calendar'),
            Calendar[Date] &amp;gt;= StartDate &amp;amp;&amp;amp;
            Calendar[Date] &amp;lt;= CurrentDate &amp;amp;&amp;amp;
            Calendar[IsWorkingDay] = 1
        )
    ),
    BLANK()  -- If the date is before November 1, return blank
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The resulting output is shown below. I've transposed the visualization to save space.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached an example pbix file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 03:20:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4285098#M170080</guid>
      <dc:creator>DataNinja777</dc:creator>
      <dc:date>2024-11-15T03:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Show previous date data on matrix table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4285677#M170107</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="608865" data-lia-user-login="DataNinja777" class="lia-mention lia-mention-user"&gt;DataNinja777&lt;/a&gt;&amp;nbsp;, I tried your formual in my case. it works on most data&amp;nbsp; but some data seemed weir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from below screen you can see on 11/21 there's carryover data 52550 which accordig to your method should be 1800 since actually there's no data on that day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's few other colum also encountered such issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also show you the table view screen shot for your reference. Pls kindly advise if I can improve.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;carryover_mavqty = 
VAR currentdate=SELECTEDVALUE(Calendar_Table[Date])
VAR previousqty =
    CALCULATE(
        MAXX(
            FILTER(
                ALL(Calendar_Table),
                Calendar_Table[Date] &amp;lt; currentdate &amp;amp;&amp;amp; NOT(ISBLANK([sum_mavqty]))
            ),
            [sum_mavqty]
        )
    )
RETURN
IF(
    ISBLANK([sum_mavqty]),previousqty,[sum_mavqty])
 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 08:25:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-previous-date-data-on-matrix-table/m-p/4285677#M170107</guid>
      <dc:creator>nbufff</dc:creator>
      <dc:date>2024-11-15T08:25:14Z</dc:date>
    </item>
  </channel>
</rss>

