<?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 How to get correct total of measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2501149#M69148</link>
    <description>&lt;P&gt;I have created measure which shows revised target for a sales person dc(distribution channel)wise but i'm getting measure total incorrect.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;dax for revised target&lt;BR /&gt;revised target =&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Revised_target = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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;TargetBySalesPersonAll[Target_Amount]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;TargetBySalesPersonAll[Revision_No]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TargetBySalesPersonAll[Revision_No]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;similar way i have written dax for initial target it gives me correct total&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;SPAN&gt;Initial_Target=CALCULATE(Sum(TargetBySalesPersonAll[Target_Amount]),TargetBySalesPersonAll[Revision_No]=1)&amp;nbsp;&lt;BR /&gt;what's wrong&amp;nbsp; in revised_target dax ?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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;</description>
    <pubDate>Mon, 09 May 2022 07:08:38 GMT</pubDate>
    <dc:creator>komald</dc:creator>
    <dc:date>2022-05-09T07:08:38Z</dc:date>
    <item>
      <title>How to get correct total of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2501149#M69148</link>
      <description>&lt;P&gt;I have created measure which shows revised target for a sales person dc(distribution channel)wise but i'm getting measure total incorrect.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;dax for revised target&lt;BR /&gt;revised target =&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Revised_target = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&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;TargetBySalesPersonAll[Target_Amount]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;TargetBySalesPersonAll[Revision_No]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TargetBySalesPersonAll[Revision_No]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;similar way i have written dax for initial target it gives me correct total&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;SPAN&gt;Initial_Target=CALCULATE(Sum(TargetBySalesPersonAll[Target_Amount]),TargetBySalesPersonAll[Revision_No]=1)&amp;nbsp;&lt;BR /&gt;what's wrong&amp;nbsp; in revised_target dax ?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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;</description>
      <pubDate>Mon, 09 May 2022 07:08:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2501149#M69148</guid>
      <dc:creator>komald</dc:creator>
      <dc:date>2022-05-09T07:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get correct total of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2501391#M69156</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="375792" data-lia-user-login="komald" class="lia-mention lia-mention-user"&gt;komald&lt;/a&gt; , if you use row context you need build total using visual&amp;nbsp; context&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revised_target =&lt;/P&gt;
&lt;P&gt;sumx( Addcolumns( summarize(table, Table[person id], table[reveison] ), "_1"&lt;BR /&gt;CALCULATE(Sum(TargetBySalesPersonAll[Target_Amount]),filter(allselected(TargetBySalesPersonAll), TargetBySalesPersonAll[Revision_No]=MAX(TargetBySalesPersonAll[Revision_No])) ), [_1])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=ufHOOLdi_jk" target="_blank"&gt;https://www.youtube.com/watch?v=ufHOOLdi_jk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 08:23:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2501391#M69156</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-09T08:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get correct total of measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2512671#M69736</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="375792" data-lia-user-login="komald" class="lia-mention lia-mention-user"&gt;komald&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure will calculate and generate results per the calculation context. At the same time, the total of measure will do calculations as well and it may be impacted by the functions in your dax formula. So to make the total correct, you can simply create another Measure to help you correct the total.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CorrectTotal =
VAR midT =
    ADDCOLUMNS (
        TargetBySalesPersonAll,
        "Revised",
            CALCULATE (
                TargetBySalesPersonAll[Revised_target],
                VALUES ( TargetBySalesPersonAll[DCCode] )
            )
    )
RETURN
    SUMX ( midT, [Revised] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some blogs/links may help you better handle such kind of incorrect Measure total as well.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Measure-total-incorrect/m-p/885639" target="_blank"&gt;Solved: Measure total incorrect - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/fixing-incorrect-totals-using-dax-measures-in-power-bi/" target="_blank"&gt;Fixing Incorrect Totals Using DAX Measures In Power BI | Enterprise DNA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://finance-bi.com/blog/power-bi-totals-incorrect/#:~:text=First%20solution%20for%20incorrect%20totals%20in%20Power%20BI%3A,then%20sum%20up%20the%20rows%20for%20the%20total." target="_blank"&gt;Power BI: Totals Incorrect and how to Fix it - Finance BI (finance-bi.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is any post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how your tables look like, the relationships you create for them and how you create these two count measures. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 08:46:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-get-correct-total-of-measure/m-p/2512671#M69736</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2022-05-27T08:46:13Z</dc:date>
    </item>
  </channel>
</rss>

