<?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: Budget + Actual Totals Not Summing Right in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-Actual-Totals-Not-Summing-Right/m-p/3735019#M145571</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="652601" data-lia-user-login="NikkiG12" class="lia-mention lia-mention-user"&gt;NikkiG12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;It seems like the issue might be with the &lt;STRONG&gt;ALLEXCEPT&lt;/STRONG&gt; function in your DAX formula.&amp;nbsp;&lt;STRONG&gt;ALLEXCEPT&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;retains all filters for the specified columns, but it removes filters from all other columns in the table. If you are getting the annual total for each month, it’s likely because the filter on the months is being removed, and thus the calculation is summing over the entire year.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think you can use FILTER&amp;nbsp;function to keep the context of the current month when calculating the total.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is the adjusted DAX code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total_Budget = 
CALCULATE(
    SUM('Budget'[Budget]), 
    FILTER(
        ALL('CalendarTable'[Month_Name]), 
        'CalendarTable'[Month_Name] = MAX('CalendarTable'[Year])
    )
)&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 09:01:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-27T09:01:51Z</dc:date>
    <item>
      <title>Budget + Actual Totals Not Summing Right</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-Actual-Totals-Not-Summing-Right/m-p/3734532#M145556</link>
      <description>&lt;P&gt;I have three data tables: Budget, YTD, Calendar. I've made a relationship between budget and calendar by year, and same relationship from calendar and YTD by year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to create a column chart where each month is summed and it changes based on a year splicer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've tried many different ways but I can't seem to get the months to sum with their respective amounts, each month just gives me the annual total. Here's my last dax, its the same for YTD"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total_Budget =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Budget'&lt;/SPAN&gt;&lt;SPAN&gt;[Budget]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'CalendarTable'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'CalendarTable'&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;CalendarTable&lt;/SPAN&gt;&lt;SPAN&gt;[Month_Name]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 19:47:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-Actual-Totals-Not-Summing-Right/m-p/3734532#M145556</guid>
      <dc:creator>NikkiG12</dc:creator>
      <dc:date>2024-02-29T19:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Budget + Actual Totals Not Summing Right</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-Actual-Totals-Not-Summing-Right/m-p/3735019#M145571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="652601" data-lia-user-login="NikkiG12" class="lia-mention lia-mention-user"&gt;NikkiG12&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;It seems like the issue might be with the &lt;STRONG&gt;ALLEXCEPT&lt;/STRONG&gt; function in your DAX formula.&amp;nbsp;&lt;STRONG&gt;ALLEXCEPT&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;retains all filters for the specified columns, but it removes filters from all other columns in the table. If you are getting the annual total for each month, it’s likely because the filter on the months is being removed, and thus the calculation is summing over the entire year.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think you can use FILTER&amp;nbsp;function to keep the context of the current month when calculating the total.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is the adjusted DAX code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total_Budget = 
CALCULATE(
    SUM('Budget'[Budget]), 
    FILTER(
        ALL('CalendarTable'[Month_Name]), 
        'CalendarTable'[Month_Name] = MAX('CalendarTable'[Year])
    )
)&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 09:01:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Budget-Actual-Totals-Not-Summing-Right/m-p/3735019#M145571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-27T09:01:51Z</dc:date>
    </item>
  </channel>
</rss>

