<?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: Per day sum filtered by date and id in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548373#M136467</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="650278" data-lia-user-login="monogamer" class="lia-mention lia-mention-user"&gt;monogamer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not sure if i fully get you, try like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Daily Balance = 
MAXX(
    ADDCOLUMNS(
        VALUES(CALENDAR[date]),
        "DailySum",
        CALCULATE(SUM(Balances[Balance]))
    ),
    [DailySum]
)&lt;/LI-CODE&gt;
&lt;P&gt;and&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Daily Balance Date = 
VAR _max = [Max Daily Balance]
VAR _date =
MAXX(
    FILTER(
        ADDCOLUMNS(
            VALUES(CALENDAR[date]),
            "DailySum",
            CALCULATE(SUM(Balances[Balance]))
        ),
        [DailySum]=_max
    ),
  CALENDAR[date]  
)
RETURN _date&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it worked like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2023 07:09:41 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-11-23T07:09:41Z</dc:date>
    <item>
      <title>Per day sum filtered by date and id</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3546892#M136399</link>
      <description>&lt;P&gt;Hello, all.&lt;/P&gt;&lt;P&gt;I have a balance table loaded into Power BI with the following shape:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This table is then connected to 2 other table, Calendar and Accounts, by the Date and Account_id column, respectively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is do is create 2 measures that calculated the maximum value found and its lastest corresponding date for:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- All selected accounts (number of accounts can vary), while being able to set which accounts I want "active" via slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;- The selected time frame, while being able to select said time frame via slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, having all accounts and dates available, the value should be 14 750 euro, on 2023/09/05, while if only having account 1 "active", the value should be 10 152 euro, on 2023/09/09.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can download the demo file here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1eFwNcYaLRdQm9C-BC30BwLNdwGved2i3/view?usp=drive_link" target="_blank"&gt;https://drive.google.com/file/d/1eFwNcYaLRdQm9C-BC30BwLNdwGved2i3/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 13:50:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3546892#M136399</guid>
      <dc:creator>monogamer</dc:creator>
      <dc:date>2023-11-22T13:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Per day sum filtered by date and id</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548267#M136464</link>
      <description>&lt;P&gt;will see the demo file, meanwhile try this&lt;/P&gt;&lt;P&gt;make a summarize table of balance group by date and department.&lt;/P&gt;&lt;P&gt;create measure of max balance = calculate(max(summarize [balance]), allexcept(summarize, summarize [department]).&lt;/P&gt;&lt;P&gt;create measure of max balance date = calculate(max(summarize [date]),&amp;nbsp;allexcept(summarize, summarize [department]),balance = balance measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 06:05:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548267#M136464</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2023-11-23T06:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Per day sum filtered by date and id</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548373#M136467</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="650278" data-lia-user-login="monogamer" class="lia-mention lia-mention-user"&gt;monogamer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not sure if i fully get you, try like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Daily Balance = 
MAXX(
    ADDCOLUMNS(
        VALUES(CALENDAR[date]),
        "DailySum",
        CALCULATE(SUM(Balances[Balance]))
    ),
    [DailySum]
)&lt;/LI-CODE&gt;
&lt;P&gt;and&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Max Daily Balance Date = 
VAR _max = [Max Daily Balance]
VAR _date =
MAXX(
    FILTER(
        ADDCOLUMNS(
            VALUES(CALENDAR[date]),
            "DailySum",
            CALCULATE(SUM(Balances[Balance]))
        ),
        [DailySum]=_max
    ),
  CALENDAR[date]  
)
RETURN _date&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it worked like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 07:09:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548373#M136467</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-23T07:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Per day sum filtered by date and id</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548888#M136485</link>
      <description>&lt;P&gt;Thank you so much,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;! From all the testing I did on the demo and the actual report, those 2 measures seem to hit the nail right on the head!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I guess I finally learnt how to make calculated columns dynamic by storing them in a variable. I either kept using MAX or calculating a new column but wasn't being able to connect the 2 processes together to make it dynamic.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 11:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Per-day-sum-filtered-by-date-and-id/m-p/3548888#M136485</guid>
      <dc:creator>monogamer</dc:creator>
      <dc:date>2023-11-23T11:42:52Z</dc:date>
    </item>
  </channel>
</rss>

