<?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: Filling values for missing dates for many attribute combinations in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2641013#M77533</link>
    <description>&lt;P&gt;Amazing solution and great work&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly!&lt;/P&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 09:47:13 GMT</pubDate>
    <dc:creator>kostask</dc:creator>
    <dc:date>2022-07-15T09:47:13Z</dc:date>
    <item>
      <title>Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2633851#M77160</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I had the community's support for a similar problem, but the specific one seems more complicated for me to resolve.&lt;/P&gt;&lt;P&gt;So, we have 3 attributes (Bank, CustomerNo, AccountNo), which give many possible combinations.&lt;/P&gt;&lt;P&gt;I created a consolidated table that gives the closing balance per date per combination (table A)&lt;img /&gt;&lt;/P&gt;&lt;P&gt;My problem is that when trying to calculate the total balance per date (and per attribute or combinations)&amp;nbsp;&lt;SPAN&gt;in a time series, I have missing dates, some completely (ex 2/7/2022), and some per one attribute (ex 4/7/2022 for CustomerNo 2000), because there don't exist records for the bank to generate a closing balance for the specific dates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, I guess we need a calendar with all dates and a calculated measure that will calculate the closing balance of the missing dates, using the last available closing balance, and all above for the compilations of the 3 attributes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expected outcome is given in table B. I tried with colored backgrounds to connect the groups of records that exist (table A) with the ones that have to be generated (table B).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Also provide table A, in case someone wants to use it.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Bank&lt;/TD&gt;&lt;TD&gt;CustomerNo&lt;/TD&gt;&lt;TD&gt;AccountNo&lt;/TD&gt;&lt;TD&gt;Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;XXX&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;XXX&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;VVV&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5/7/2022&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/7/2022&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;OOO&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6/7/2022&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;OOO&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6/7/2022&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;PPP&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/7/2022&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;LLL&lt;/TD&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/7/2022&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;2000&lt;/TD&gt;&lt;TD&gt;LLL&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 13:53:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2633851#M77160</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-12T13:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634583#M77210</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I guess this is very similar to this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculating-dimension-for-missing-dates/m-p/2632814#M77074" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculating-dimension-for-missing-dates/m-p/2632814#M77074&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 19:49:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634583#M77210</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-12T19:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634670#M77212</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Really very similar and based on the same problem. The solution worked fine.&lt;/P&gt;&lt;P&gt;The final request came with more than one attributes. I tried to solve it by making changes at ALLEXCEPT&amp;nbsp; function (added bank and customer),but didn't manage to reach the right result.&lt;/P&gt;&lt;P&gt;Do I miss something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 21:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634670#M77212</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-12T21:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634674#M77213</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;In order to obtain correct totals please follow updated sample file&amp;nbsp;&lt;A href="https://we.tl/t-W0y5fERFnF" target="_blank"&gt;https://we.tl/t-W0y5fERFnF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The new measure refers to the original measure using switch statement&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Closing Balance = 
VAR CurrentDate = MAX ( 'Date'[Date] )
VAR CurrentValue = SELECTEDVALUE ( Sheet1[Value] )
VAR CurrentAcountTable = CALCULATETABLE ( Sheet1, ALLEXCEPT ( Sheet1, Sheet1[Account] ) )
VAR PreviousDatesTable = FILTER ( CurrentAcountTable, Sheet1[Date] &amp;lt; CurrentDate )
VAR PreviousDate = MAXX ( PreviousDatesTable, Sheet1[Date] )
VAR PreviousDateTable = FILTER ( PreviousDatesTable, Sheet1[Date] = PreviousDate )
VAR PreviousValue = MAXX ( PreviousDateTable, Sheet1[Value] )
RETURN
    COALESCE ( CurrentValue, PreviousValue )&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;Total Colsing Balance = 
SWITCH (
    TRUE ( ),
    ISINSCOPE ( Sheet1[Account] ) &amp;amp;&amp;amp; ISINSCOPE ( 'Date'[Date] ), [Closing Balance],
    ISINSCOPE ( Sheet1[Account] ), SUMX ( VALUES ( 'Date'[Date] ), [Closing Balance] ),
    SUMX ( CROSSJOIN ( VALUES ( 'Date'[Date] ), ALL ( Sheet1[Account] ) ), [Closing Balance] )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 21:19:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634674#M77213</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-12T21:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634685#M77216</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;we may connect tomorrow via zoom or teams so you can explaing your issue. Meanwhile please check the updated solution above and see if it may help.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 21:32:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2634685#M77216</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-12T21:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2635763#M77260</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, the solution does not give the right results.&lt;/P&gt;&lt;P&gt;Maybe if it was possible to be adjusted to table A, we could see what is wrong.&lt;/P&gt;&lt;P&gt;I tried it but without result&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 08:41:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2635763#M77260</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-13T08:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2635822#M77265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry I'm not able catchup what exactly is your concern. As suggested above can we connect via zoom or teams so that you can explain to me what is the issue?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 09:04:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2635822#M77265</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-13T09:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2636520#M77300</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;Could you please send your contact details to &lt;U&gt;&lt;A href="mailto:k-krom1@hotmail.com" target="_blank" rel="noopener"&gt;k-krom1@hotmail.com&lt;/A&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Thank you Kostas&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 13:34:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2636520#M77300</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-13T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2639622#M77466</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is the updated solution with correct subtotals&amp;nbsp;&lt;A href="https://we.tl/t-ULVbpV6vB9" target="_blank" rel="noopener"&gt;https://we.tl/t-ULVbpV6vB9&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;FinalBalance1 = 
VAR CurrentDate =
    MAX ( 'Calendar'[Date] )
VAR IterationTable =
    CALCULATETABLE (
        SUMMARIZE ( 'Totals', 'Totals'[Bank], 'Totals'[Company], 'Totals'[AccountNo] ),
        ALL ( 'Calendar' )
    )
RETURN
    SUMX (
        IterationTable,
        CALCULATE (
            VAR CurrentValue =
                SUM ( 'Totals'[FinalBalance] )
            VAR CurrentAcountTable =
                CALCULATETABLE ( 'Totals', ALL ('Calendar' ) )
            VAR PreviousDatesTable =
                FILTER ( CurrentAcountTable, 'Totals'[Date] &amp;lt; CurrentDate )
            VAR PreviousDate =
                MAXX ( PreviousDatesTable, 'Totals'[Date] )
            VAR PreviousDateTable =
                FILTER ( PreviousDatesTable, 'Totals'[Date] = PreviousDate )
            VAR PreviousValue =
                SUMX ( PreviousDateTable, 'Totals'[FinalBalance] )
            RETURN
                - COALESCE ( CurrentValue, PreviousValue )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 09:08:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2639622#M77466</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-15T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2641013#M77533</link>
      <description>&lt;P&gt;Amazing solution and great work&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly!&lt;/P&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 09:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2641013#M77533</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-15T09:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Filling values for missing dates for many attribute combinations</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2641058#M77541</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did two ways to create a new table&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Using DAX&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table 2 =
var _t= SUMMARIZE('A',[Bank],[AccountNo],[CustomerNo],"Min",MIN('A'[Date]),"Max",MAX('A'[Date]))

var _t2=  CROSSJOIN( _t , CALENDAR(MIN('A'[Date]),MAX('A'[Date])))

return FILTER( _t2,[Date]&amp;gt;=[Min] &amp;amp;&amp;amp; [Date]&amp;lt;=[Max])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In Power Query：&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Group by --&amp;gt; Add custom column --&amp;gt;Expand and Change type&lt;/P&gt;&lt;P&gt;&lt;img /&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;Output:&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;Here is the M code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fdA9CsAgDAXgu2QuNEm1nVtXQScRpPe/RlMjFLE4+CTw8fwpBWg9VkZmWOCURYgoW85ZB7iXAmZmWM3WG1bjnNPhz7SelJLk1oyd9BANPdfXE0KQtEr2KZmZGON7rq2EetJu472XNOOrBlN/8H4A", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Bank = _t, CustomerNo = _t, AccountNo = _t, Balance = _t]),
    #"Changed Type with Locale" = Table.TransformColumnTypes(Source, {{"Date", type date}}, "en-GB"),
    #"Changed Type" = Table.TransformColumnTypes(#"Changed Type with Locale",{{"Bank", type text}, {"CustomerNo", Int64.Type}, {"AccountNo", type text}, {"Balance", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Bank", "CustomerNo", "AccountNo"}, {{"Max", each List.Max([Date]), type nullable date}, {"Min", each List.Min([Date]), type nullable date}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each {Number.From([Min])..Number.From([Max])}),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Custom",{{"Custom", type date}})
in
    #"Changed Type1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the table is created, add a new column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Balance = CALCULATE(MAX('A'[Balance]),FILTER('A',[Bank]=EARLIER('New Table'[Bank]) &amp;amp;&amp;amp; [AccountNo]=EARLIER('New Table'[AccountNo]) &amp;amp;&amp;amp; [CustomerNo]=EARLIER('New Table'[CustomerNo]) &amp;amp;&amp;amp; [Date]&amp;lt;=EARLIER('New Table'[Date])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jianbo Li&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&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 10:02:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filling-values-for-missing-dates-for-many-attribute-combinations/m-p/2641058#M77541</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-07-15T10:02:20Z</dc:date>
    </item>
  </channel>
</rss>

