<?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 Adjust the measure to also calculate the sum for the grid total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3697200#M143773</link>
    <description>&lt;P&gt;Hi friends,&lt;BR /&gt;&lt;BR /&gt;How can I adjust the DAX measure below to also calculate the sum for the grid total?&lt;/P&gt;&lt;P&gt;I have the following DAX measure below, it works correctly, 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 total.&lt;/P&gt;&lt;P&gt;Download the PBIX &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;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 20:25:53 GMT</pubDate>
    <dc:creator>Rai_BI</dc:creator>
    <dc:date>2024-02-13T20:25:53Z</dc:date>
    <item>
      <title>Adjust the measure to also calculate the sum for the grid total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3697200#M143773</link>
      <description>&lt;P&gt;Hi friends,&lt;BR /&gt;&lt;BR /&gt;How can I adjust the DAX measure below to also calculate the sum for the grid total?&lt;/P&gt;&lt;P&gt;I have the following DAX measure below, it works correctly, 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 total.&lt;/P&gt;&lt;P&gt;Download the PBIX &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;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&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;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 20:25:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3697200#M143773</guid>
      <dc:creator>Rai_BI</dc:creator>
      <dc:date>2024-02-13T20:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust the measure to also calculate the sum for the grid total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3697642#M143799</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="570958" data-lia-user-login="Rai_BI" class="lia-mention lia-mention-user"&gt;Rai_BI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It seems like a common issue that appears when measure calculate with multiple aggregations, you can refer other greg's blog to know how to handle this scenario.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_self"&gt; Measure Totals, The Final Word&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 02:09:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3697642#M143799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-14T02:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust the measure to also calculate the sum for the grid total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3698983#M143870</link>
      <description>&lt;P&gt;Thank you, looks like we´re in rigth track. But i still don´t know how to apply this solution on my issue, can you help me?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 14:30:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3698983#M143870</guid>
      <dc:creator>Rai_BI</dc:creator>
      <dc:date>2024-02-14T14:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust the measure to also calculate the sum for the grid total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3701924#M143976</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="570958" data-lia-user-login="Rai_BI" class="lia-mention lia-mention-user"&gt;Rai_BI&lt;/a&gt;&amp;nbsp;Try using HASONEVALUE instead of HASONEFILTER.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 16:42:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3701924#M143976</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-02-15T16:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust the measure to also calculate the sum for the grid total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3701987#M143980</link>
      <description>&lt;P&gt;I already try it, but did not work.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 17:10:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adjust-the-measure-to-also-calculate-the-sum-for-the-grid-total/m-p/3701987#M143980</guid>
      <dc:creator>Rai_BI</dc:creator>
      <dc:date>2024-02-15T17:10:50Z</dc:date>
    </item>
  </channel>
</rss>

