<?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: Getting  Wrong Grand Total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3882175#M151520</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707033" data-lia-user-login="Ben9987" class="lia-mention lia-mention-user"&gt;Ben9987&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try the below measures&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total = Sumx ( YourTable, IF(ISBLANK(Measure A),Measure B,Measure A)  )&lt;/LI-CODE&gt;&lt;P&gt;and use this measure in table visual..&lt;BR /&gt;If this is not working, requesting you to provide your pbix file with dummy data..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sanalytics&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If it is your solution then please like and accept it as solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 10:05:47 GMT</pubDate>
    <dc:creator>sanalytics</dc:creator>
    <dc:date>2024-05-01T10:05:47Z</dc:date>
    <item>
      <title>Getting  Wrong Grand Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3881218#M151502</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am having the following issue&lt;/P&gt;&lt;P&gt;i have a table visual in Power BI and i have 2 measures (Measure A,Measure B).These 2 Measure are coming from different fact table.Below is the screenshot attached&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the Scenario here is&amp;nbsp; for Country 2 since Measure A is blank ,We need to replace Measure B Value in Measure A.So i have used the following Dax function IF(ISBLANK(Measure A),Measure B,Measure A) and have got the following output as shown below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now what happens is when grand total is being calculated it only gives me the total of Country 1 in Measure A (i.e 100)as shown below&amp;nbsp; but the&amp;nbsp; output should have been 400.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMX() resolves the issue&amp;nbsp;but Measure A and Measure B would be used across other dimensions as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am seeking guidance on how best to address this issue and achieve the desired outcome efficiently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your attention to this matter, and I look forward to your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 04:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3881218#M151502</guid>
      <dc:creator>Ben9987</dc:creator>
      <dc:date>2024-05-01T04:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting  Wrong Grand Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3882175#M151520</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707033" data-lia-user-login="Ben9987" class="lia-mention lia-mention-user"&gt;Ben9987&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try the below measures&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total = Sumx ( YourTable, IF(ISBLANK(Measure A),Measure B,Measure A)  )&lt;/LI-CODE&gt;&lt;P&gt;and use this measure in table visual..&lt;BR /&gt;If this is not working, requesting you to provide your pbix file with dummy data..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sanalytics&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If it is your solution then please like and accept it as solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 10:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3882175#M151520</guid>
      <dc:creator>sanalytics</dc:creator>
      <dc:date>2024-05-01T10:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting  Wrong Grand Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3882214#M151521</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707033" data-lia-user-login="Ben9987" class="lia-mention lia-mention-user"&gt;Ben9987&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;First please vote for this idea by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;First, please vote for this idea:&amp;nbsp;&lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e" target="_blank" rel="nofollow noopener noreferrer"&gt;https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This looks like a measure totals problem. Very common. See my post about it here:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Also:&amp;nbsp;&lt;A href="https://youtu.be/uXRriTN0cfY" target="_blank" rel="nofollow noopener noreferrer"&gt;https://youtu.be/uXRriTN0cfY&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;And:&amp;nbsp;&lt;A href="https://youtu.be/n4TYhF2ARe8" target="_blank" rel="nofollow noopener noreferrer"&gt;https://youtu.be/n4TYhF2ARe8&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;In order to force additivity over your measure you need to aggregate the values using SUMX by iterating the distinct visible values of the column (or column combinations) that represents the core structure of your Table or Matrix visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;MeasureA Correct Total =
SUMX ( DISTINCT ( 'Table'[Country] ), COALESCE ( [MeasureA], [MeasureB] ) )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 10:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3882214#M151521</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-05-01T10:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting  Wrong Grand Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3887547#M151652</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="707033" data-lia-user-login="Ben9987" class="lia-mention lia-mention-user"&gt;Ben9987&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information and description to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 02:01:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-Wrong-Grand-Total/m-p/3887547#M151652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-03T02:01:13Z</dc:date>
    </item>
  </channel>
</rss>

