<?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 Blanks with latest, in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305268#M57057</link>
    <description>&lt;P&gt;Thanks, but I didn´t work,&lt;/P&gt;&lt;P&gt;The formula should find last non blank date for the secuence of dues &lt;U&gt;within the same&amp;nbsp;&lt;/U&gt;&lt;SPAN&gt;&lt;U&gt;product (combination [A]-[B])&lt;/U&gt;&amp;nbsp;and &lt;U&gt;considering only the last modification [C] prior to the empty date&lt;/U&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jan 2022 13:41:01 GMT</pubDate>
    <dc:creator>DavidGolden</dc:creator>
    <dc:date>2022-01-27T13:41:01Z</dc:date>
    <item>
      <title>Fill Blanks with latest,</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305035#M57037</link>
      <description>&lt;P&gt;Hello Community, please consider helping me out here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this dataset of payments registered in the company, wich is imported monthly from xlsx file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;C&lt;/STRONG&gt;&lt;/P&gt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&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12/2/2021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-1711,84&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;225421&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10/2/2021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12/2/2021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;672,05&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1583181&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;12/2/2021&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1711,84&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each product (each one is a combination [A]-[B]), payments are scheduled in a series of dues, whose secuential number for each product is [D].&lt;/P&gt;&lt;P&gt;Each Due has a foreseen date for payment [E] and an effective paymen date [F], wich may be earlier or later.&lt;/P&gt;&lt;P&gt;Some clients may introduce changes to the terms of the service wich are registered secuentially for each product in notes [C]. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Lastly, [G] is the amount pactually payed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue here is that, as you can see above, some due dates&amp;nbsp;[E] are &lt;STRONG&gt;&lt;EM&gt;null&lt;/EM&gt;&lt;/STRONG&gt; in the dataset, and I need to find the way to fill them, for each product (combination [A]-[B]), with the last non-blank date in previous dues [D]. There are nearly 100k records each month, and they are mixed, and usually the date needed for filling is not within the montly batch, so the function "fill down" at PowerQuery is not usefull here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above case, it should be &lt;STRONG&gt;&lt;FONT color="#800080"&gt;28/12/2020&lt;/FONT&gt;&lt;/STRONG&gt; in the first null and &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;12/2/2021&lt;/FONT&gt;&lt;/STRONG&gt; in the second empty cell.&lt;/P&gt;&lt;P&gt;I don´t have too much experience with this and can´t figure it out how to solve this with PowerQuery or DAX syntax.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 11:35:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305035#M57037</guid>
      <dc:creator>DavidGolden</dc:creator>
      <dc:date>2022-01-27T11:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Blanks with latest,</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305102#M57041</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;You can create measure with IF logic. E.g.&lt;BR /&gt;var curdate = MAX('Calendar'[Date])&lt;BR /&gt;var latestnonblank =&amp;nbsp; CALCULATE(MAX('Table'[Date]),ALL('Calendar'),'Table'[Date]&amp;lt;=curdate) return&lt;BR /&gt;&lt;BR /&gt;IF([your value]=blank(),latestnonblank,[your value])&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 12:00:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305102#M57041</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-27T12:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Blanks with latest,</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305268#M57057</link>
      <description>&lt;P&gt;Thanks, but I didn´t work,&lt;/P&gt;&lt;P&gt;The formula should find last non blank date for the secuence of dues &lt;U&gt;within the same&amp;nbsp;&lt;/U&gt;&lt;SPAN&gt;&lt;U&gt;product (combination [A]-[B])&lt;/U&gt;&amp;nbsp;and &lt;U&gt;considering only the last modification [C] prior to the empty date&lt;/U&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 13:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2305268#M57057</guid>
      <dc:creator>DavidGolden</dc:creator>
      <dc:date>2022-01-27T13:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Blanks with latest,</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2312325#M57520</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I can roughly understand your requirement, you can try this measure:&lt;/P&gt;
&lt;P&gt;This is the test data I created based on your description:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First you can go to the Power Query to add an index column to the dataset like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can apply and go to the Power BI to create these two calculated columns like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank_B =

RANKX(FILTER(ALL('Table'),'Table'[B]=EARLIER('Table'[B])),'Table'[Index],,ASC,Dense)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;E_new =

var _lastE=CALCULATE(MAX('Table'[E]),FILTER(ALL('Table'),'Table'[Rank_B]=EARLIER('Table'[Rank_B])-1&amp;amp;&amp;amp;'Table'[B]=EARLIER('Table'[B])))

return

IF('Table'[E]=BLANK(),_lastE,'Table'[E])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can create a table chart to place it like this to get what you want, like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can download my test pbix file below&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 07:09:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2312325#M57520</guid>
      <dc:creator>v-robertq-msft</dc:creator>
      <dc:date>2022-02-01T07:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Fill Blanks with latest,</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2315786#M57692</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="260975" data-lia-user-login="v-robertq-msft" class="lia-mention lia-mention-user"&gt;v-robertq-msft&lt;/a&gt;&amp;nbsp;, your aproach helped me. I tried your formulas and worked, but returned some incorrect values. I realised the data should be ordered first, within the query. But at trying so, my query and PBIX file broke for some reason I can´t really understand yet, maybe it has something to do with the multiple columns ordering. I guess the issue is solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldnt say wether it will solve my problem.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 16:45:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fill-Blanks-with-latest/m-p/2315786#M57692</guid>
      <dc:creator>DavidGolden</dc:creator>
      <dc:date>2022-02-02T16:45:21Z</dc:date>
    </item>
  </channel>
</rss>

