<?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: Fill in blanks with last non blank value (using DAX measure) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/1244820#M20430</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I know this is from a while ago but I just wondered, I am trying to do the same thing but with a text value therefore SUM cannot be used. Can I ask how you would chnge this to work for a STRING data type?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 11:20:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-07-23T11:20:04Z</dc:date>
    <item>
      <title>Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859013#M6908</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to fill in blank values with the previous non blank value? I need this to be done with a dax measure because of my data model, as I'm using a date dimensional table.&lt;BR /&gt;&lt;BR /&gt;The measure I'm currently using is this one:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PrecoMedioMovelv2 = 

CALCULATE(
    LASTNONBLANK(MaterialAvaliacao[PrecoMedioMovel];MaterialAvaliacao[PrecoMedioMovel]);
    FILTER(ALL('Date'); 'Date'[Date] &amp;lt;= MAX('Date'[Date]))
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But the problem is that it always returns the max value of the column MaterialAvaliacao[PrecoMedioMovel] for the given date context, as you can see in the picture below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired output is the following:&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;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's also the data model I'm using (for the current exercice, table MaterialMovimento doesn't need to be considered)&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;Thanks in advance!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 00:26:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859013#M6908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-28T00:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859019#M6910</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PrecoMedioMovelv2 =
VAR _date =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        LASTNONBLANK (
            MaterialAvaliacao[PrecoMedioMovel];
            MaterialAvaliacao[PrecoMedioMovel]
        );
        FILTER ( ALLEXCEPT ( 'Date', 'Date'[Date] ); 'Date'[Date] &amp;lt;= _date )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This should get the date from the row that you are on.&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;are nice too.&lt;BR /&gt;Nathaniel&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 00:45:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859019#M6910</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-28T00:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859021#M6911</link>
      <description>&lt;P&gt;Thanks for the quick answer.&lt;BR /&gt;&lt;BR /&gt;But that measure returns the following error message: 'A single value for column 'Date' in table 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.'&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 00:55:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859021#M6911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-28T00:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859025#M6912</link>
      <description>&lt;P&gt;Sorry try this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PrecoMedioMovelv2 =
VAR _date =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        LASTNONBLANK (
            MaterialAvaliacao[PrecoMedioMovel],
            MaterialAvaliacao[PrecoMedioMovel]
        ),
        FILTER ( ALLEXCEPT ( 'Date', 'Date'[Date] ), MAX ( 'Date'[Date] ) &amp;lt;= _date )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 01:02:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859025#M6912</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-28T01:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859030#M6913</link>
      <description>&lt;P&gt;It's returning 6,15 for every record..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In case you want to try, here's a link with the .pbix file:&amp;nbsp;&lt;A href="https://drive.google.com/drive/folders/1xtRMllYdA3HYsF0dzDa-UmnRTloDh6Ff?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1xtRMllYdA3HYsF0dzDa-UmnRTloDh6Ff?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 01:14:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859030#M6913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-28T01:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859036#M6914</link>
      <description>&lt;P&gt;Will do.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 01:18:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/859036#M6914</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-28T01:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/860027#M6942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Try this:&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LastNonBlank Value =
VAR LastNonBlankDate =
    CALCULATE (
        MAX ( myTable[Date] ),
        FILTER (
            ALL ( myTable ),
            myTable[Date] &amp;lt;= MAX ( myTable[Date] )
                &amp;amp;&amp;amp; myTable[Value] &amp;lt;&amp;gt; 0
        )
    )
RETURN
    CALCULATE (
        SUM ( myTable[Value] ),
        FILTER ( ALL ( myTable ), myTable[Date] = LastNonBlankDate )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 21:37:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/860027#M6942</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-11-28T21:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/865644#M7056</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Here is the pbix.&amp;nbsp; Glad it worked!&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AgCd7AyfqZtEz2dUw2cS3v4CisFd?e=vcWL3g" target="_blank" rel="noopener"&gt;PBIX FILE&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 22:56:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/865644#M7056</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-12-04T22:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/1244820#M20430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I know this is from a while ago but I just wondered, I am trying to do the same thing but with a text value therefore SUM cannot be used. Can I ask how you would chnge this to work for a STRING data type?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 11:20:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/1244820#M20430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-23T11:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/1361550#M24670</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what if the column "value" isn't a number/integer/etc but text?&amp;nbsp;&lt;/P&gt;&lt;P&gt;good to know.. my example is a sorted file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 13:08:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/1361550#M24670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-10T13:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/2914954#M95407</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="159166" data-lia-user-login="Nathaniel_C" class="lia-mention lia-mention-user"&gt;Nathaniel_C&lt;/a&gt;&amp;nbsp;, thank you so much to share this solution. Worked very well for me.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 11:20:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/2914954#M95407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-18T11:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/2915259#M95440</link>
      <description>&lt;P&gt;How can i use the same logic but if i have an aditional column called "product"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the same but taking in consideration the differents products.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eg:&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;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 14:40:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/2915259#M95440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-18T14:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in blanks with last non blank value (using DAX measure)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/4377018#M173783</link>
      <description>&lt;P&gt;Thank you for your information .&lt;BR /&gt;Note :&amp;nbsp;&lt;BR /&gt;If we cannot apply the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   &amp;amp;&amp;amp; myTable[Value] &amp;lt;&amp;gt; 0&lt;/PRE&gt;&lt;P&gt;in measure the logic will be changed .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 06:23:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-in-blanks-with-last-non-blank-value-using-DAX-measure/m-p/4377018#M173783</guid>
      <dc:creator>dribblekeo</dc:creator>
      <dc:date>2025-01-23T06:23:16Z</dc:date>
    </item>
  </channel>
</rss>

