<?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: Filldown measure for each Id and last status is open in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filldown-measure-for-each-Id-and-last-status-is-open/m-p/3840558#M150150</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="206549" data-lia-user-login="ruanolin" class="lia-mention lia-mention-user"&gt;ruanolin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Depending on the information you have provided, you can follow these steps below:&lt;/P&gt;
&lt;P&gt;1.Add new table with not relationship.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = DISTINCT('changes'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;2.Add new measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Real_Filldown 2 = 
VAR __LastNonBlankDate =
    CALCULATE (
        MAX ( changes[Date] ),
        'changes'[Date] &amp;lt;= MAX ( 'Table'[Date] ),
        changes[Real] &amp;lt;&amp;gt; 0,
        ALLEXCEPT ( changes, changes[Id] )
    )
VAR __result =
    CALCULATE (
        SUM ( changes[Real] ),
        FILTER ( ALLEXCEPT ( changes, changes[Id] ), changes[Date] = __LastNonBlankDate )
    )
RETURN
    __result&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Real_LastNonBlankDate 2 = 
VAR LastNonBlankDate =
    CALCULATE (
        MAX ( changes[Date] ),
        FILTER (
             ALLEXCEPT( changes , changes[Id]),
            changes[Date] &amp;lt;= MAX ( 'Table'[Date] )
                &amp;amp;&amp;amp; changes[Real] &amp;lt;&amp;gt; 0
        )
    )
RETURN 
LastNonBlankDate&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total Real = 
VAR __cur_date =
    SELECTEDVALUE ( 'Table'[Date] )
VAR __result =
    CALCULATE ( SUM ( 'changes'[Real] ), 'changes'[Date] = __cur_date )
RETURN
    __result
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2024 08:41:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-16T08:41:06Z</dc:date>
    <item>
      <title>Filldown measure for each Id and last status is open</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filldown-measure-for-each-Id-and-last-status-is-open/m-p/3838556#M150066</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have the “changes” table that stores Estimated and Real hour changes for each ID from when the project opens until it closes. I’m trying to create a measure that gives me the last value of that column for all days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following measure provides the expected result, except for days when an ID has no entries but another ID does (for example, on&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2024-02-10&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Real_Filldown = 
VAR LastNonBlankDate =
    CALCULATE (
        MAX ( changes[Date] ),
        FILTER (
             ALLEXCEPT( changes , changes[Id]),
            changes[Date] &amp;lt;= MAX ( changes[Date] )
                &amp;amp;&amp;amp; changes[Real] &amp;lt;&amp;gt; 0
                
        )
    )
RETURN
    CALCULATE (
        SUM ( changes[Real] ),
        FILTER ( ALLEXCEPT( changes , changes[Id] ), changes[Date] = LastNonBlankDate )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;How can I modify this measure to get the last value of “Real” for days when that date doesn’t exist for a specific ID but does for another (for example,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2024-02-10&lt;/SPAN&gt;&lt;SPAN&gt;)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Additionally, I’d like the “Real_Filldown” measure to only fill in data for days when the project is from “Open” to “Closed.”&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attach my example files: &lt;A href="https://easyupload.io/y2vf3y" target="_self"&gt;https://easyupload.io/y2vf3y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 14:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filldown-measure-for-each-Id-and-last-status-is-open/m-p/3838556#M150066</guid>
      <dc:creator>ruanolin</dc:creator>
      <dc:date>2024-04-15T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filldown measure for each Id and last status is open</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filldown-measure-for-each-Id-and-last-status-is-open/m-p/3840558#M150150</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="206549" data-lia-user-login="ruanolin" class="lia-mention lia-mention-user"&gt;ruanolin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Depending on the information you have provided, you can follow these steps below:&lt;/P&gt;
&lt;P&gt;1.Add new table with not relationship.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = DISTINCT('changes'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;2.Add new measures.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Real_Filldown 2 = 
VAR __LastNonBlankDate =
    CALCULATE (
        MAX ( changes[Date] ),
        'changes'[Date] &amp;lt;= MAX ( 'Table'[Date] ),
        changes[Real] &amp;lt;&amp;gt; 0,
        ALLEXCEPT ( changes, changes[Id] )
    )
VAR __result =
    CALCULATE (
        SUM ( changes[Real] ),
        FILTER ( ALLEXCEPT ( changes, changes[Id] ), changes[Date] = __LastNonBlankDate )
    )
RETURN
    __result&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Real_LastNonBlankDate 2 = 
VAR LastNonBlankDate =
    CALCULATE (
        MAX ( changes[Date] ),
        FILTER (
             ALLEXCEPT( changes , changes[Id]),
            changes[Date] &amp;lt;= MAX ( 'Table'[Date] )
                &amp;amp;&amp;amp; changes[Real] &amp;lt;&amp;gt; 0
        )
    )
RETURN 
LastNonBlankDate&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total Real = 
VAR __cur_date =
    SELECTEDVALUE ( 'Table'[Date] )
VAR __result =
    CALCULATE ( SUM ( 'changes'[Real] ), 'changes'[Date] = __cur_date )
RETURN
    __result
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 08:41:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filldown-measure-for-each-Id-and-last-status-is-open/m-p/3840558#M150150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-16T08:41:06Z</dc:date>
    </item>
  </channel>
</rss>

