<?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: DAX measure to fill the gaps in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756097#M146538</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="93736" data-lia-user-login="nijos" class="lia-mention lia-mention-user"&gt;nijos&lt;/a&gt;&amp;nbsp;Perfect. Yeah, I wasn't sure which week number format you were using so I just went with the default.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 18:38:11 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-03-11T18:38:11Z</dc:date>
    <item>
      <title>DAX measure to fill the gaps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3755943#M146529</link>
      <description>&lt;P&gt;I have created a pbix with three tables:&lt;/P&gt;&lt;P&gt;Actuals, Target and a Date table.&lt;/P&gt;&lt;P&gt;The actuals table has values for all 31 days of March 2024.&lt;/P&gt;&lt;P&gt;The target table only has values for each Friday of March 2024.&lt;/P&gt;&lt;P&gt;I want to create a measure that gives me the Target value to fill the gaps in an additional column of my matrix visual.&lt;/P&gt;&lt;P&gt;So, for each day that is not a Friday, I want to get the value of that weeks Friday value.&lt;/P&gt;&lt;P&gt;I know how to create additional rows for in the Target query via Power Query with List.Dates but I am searching for a DAX calculated measure solution (not a calculated column).&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;I have also created an example PBIX for my query.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1cQmlY0XXtThw0uIIo5RdVLlUAolRtwIE/view?usp=sharing" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1cQmlY0XXtThw0uIIo5RdVLlUAolRtwIE/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help for creating the correct DAX formula.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 17:15:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3755943#M146529</guid>
      <dc:creator>nijos</dc:creator>
      <dc:date>2024-03-11T17:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure to fill the gaps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756041#M146533</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="93736" data-lia-user-login="nijos" class="lia-mention lia-mention-user"&gt;nijos&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    VAR __Date = MAX( 'Date'[Date] )
    VAR __Week = WEEKNUM( __Date )
    VAR __Year = YEAR( __Date )
    VAR __Target = MAXX( FILTER( ALL( 'Targets' ), YEAR( [Date] ) = __Year &amp;amp;&amp;amp; WEEKNUM( [Date] ) = __Week ), [Target] )
RETURN
    __Target&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Mar 2024 18:15:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756041#M146533</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-03-11T18:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure to fill the gaps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756082#M146537</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, I had the logic in my head all afternoon but could not get it in the measure myself.&lt;BR /&gt;Added ReturnType 21 to the WEEKNUM function and now it works perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Max Target fixed = 
    VAR __Date = MAX( 'Date'[Date] )
    VAR __Week = WEEKNUM( __Date, 21 )
    VAR __Year = YEAR( __Date )
    VAR __Target = MAXX( FILTER( ALL( 'Targets' ), YEAR( [Date] ) = __Year &amp;amp;&amp;amp; WEEKNUM( [Date], 21 ) = __Week ), [Target] )
RETURN
    __Target&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 18:32:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756082#M146537</guid>
      <dc:creator>nijos</dc:creator>
      <dc:date>2024-03-11T18:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure to fill the gaps</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756097#M146538</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="93736" data-lia-user-login="nijos" class="lia-mention lia-mention-user"&gt;nijos&lt;/a&gt;&amp;nbsp;Perfect. Yeah, I wasn't sure which week number format you were using so I just went with the default.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 18:38:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-to-fill-the-gaps/m-p/3756097#M146538</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-03-11T18:38:11Z</dc:date>
    </item>
  </channel>
</rss>

