<?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: Correct calculation for grand total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701160#M143933</link>
    <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Single &lt;/SPAN&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;[Goal Seller 1]&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;[Goal Seller 2]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 15 Feb 2024 11:52:29 GMT</pubDate>
    <dc:creator>nareshr89</dc:creator>
    <dc:date>2024-02-15T11:52:29Z</dc:date>
    <item>
      <title>Correct calculation for grand total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701125#M143931</link>
      <description>&lt;P&gt;Hi, please, someone help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue as below.&lt;/P&gt;&lt;P&gt;How can I adjust the DAX measure below to also calculate the sum for the grand total?&lt;/P&gt;&lt;P&gt;I have the following DAX measure below, it works correctly for each line, but it is not calculating the total value of the grid which is returning empty.&amp;nbsp;I'm trying to use the SUMX function but it's not working to calculate the grand total.&lt;/P&gt;&lt;P&gt;You can download the PBIX&amp;nbsp;file&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://lasdobrasilcombr-my.sharepoint.com/:u:/g/personal/rai_santos_las_app_br/Eax8ktdXV4VOt8gqU3ENYPABTf_V4vBpQrUfYPSOCxncsw?e=4OlKOo" target="_self"&gt;here&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Single Measure = 

VAR Seller_1_in_Scope = HASONEFILTER('customer table'[Name Seller1])
VAR Seller_2_in_Scope = HASONEFILTER('customer table'[Name Seller2])

RETURN
SWITCH(
    TRUE(),
    Seller_1_in_Scope &amp;amp;&amp;amp; NOT Seller_2_in_Scope, 
    SUMX(
        VALUES('customer table'[Name Seller1]),CALCULATE([Goal Seller 1])),

    Seller_2_in_Scope &amp;amp;&amp;amp; NOT Seller_1_in_Scope, 
    SUMX(
        VALUES('customer table'[Name Seller2]),CALCULATE([Goal Seller 2])),

    Seller_1_in_Scope &amp;amp;&amp;amp; Seller_2_in_Scope, 
    SUMX(
        SUMMARIZE(
            'customer table',
            'customer table'[Name Seller1],'customer table'[Name Seller2]),
            CALCULATE([Goal Seller 1] + [Goal Seller 2])
)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 11:36:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701125#M143931</guid>
      <dc:creator>Rai_BI</dc:creator>
      <dc:date>2024-02-15T11:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Correct calculation for grand total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701160#M143933</link>
      <description>&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Single &lt;/SPAN&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;[Goal Seller 1]&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;[Goal Seller 2]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Feb 2024 11:52:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701160#M143933</guid>
      <dc:creator>nareshr89</dc:creator>
      <dc:date>2024-02-15T11:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Correct calculation for grand total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701621#M143966</link>
      <description>&lt;P&gt;Thank you, but it is not so easy, i need no check what column is in scope before calcate&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 14:59:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Correct-calculation-for-grand-total/m-p/3701621#M143966</guid>
      <dc:creator>Rai_BI</dc:creator>
      <dc:date>2024-02-15T14:59:26Z</dc:date>
    </item>
  </channel>
</rss>

