<?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: grand total in table visual is not summing values correctly in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489700#M133574</link>
    <description>&lt;P&gt;how can i use (Has one filter) funuction if i have multiple coulmns in my table?&lt;/P&gt;</description>
    <pubDate>Sun, 22 Oct 2023 13:49:49 GMT</pubDate>
    <dc:creator>lawadaa</dc:creator>
    <dc:date>2023-10-22T13:49:49Z</dc:date>
    <item>
      <title>grand total in table visual is not summing values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489613#M133567</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a measure where i need to multiply a percentage column with another measure . in the row level the output is correct but tabel grand total is wrong&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;new achiev measure=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[overall achiev]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Agent Rate Key'&lt;/SPAN&gt;&lt;SPAN&gt;[Agent Rate]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;i was trying to use summarize with the columns mentioned in the table but still it's not working&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 09:15:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489613#M133567</guid>
      <dc:creator>lawadaa</dc:creator>
      <dc:date>2023-10-22T09:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: grand total in table visual is not summing values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489697#M133573</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518773" data-lia-user-login="lawadaa" class="lia-mention lia-mention-user"&gt;lawadaa&lt;/a&gt;&amp;nbsp;First, please vote for this idea: &lt;A href="https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e" target="_blank"&gt;https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also: &lt;A href="https://youtu.be/uXRriTN0cfY" target="_blank"&gt;https://youtu.be/uXRriTN0cfY&lt;/A&gt;&lt;BR /&gt;And: &lt;A href="https://youtu.be/n4TYhF2ARe8" target="_blank"&gt;https://youtu.be/n4TYhF2ARe8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 13:40:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489697#M133573</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-10-22T13:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: grand total in table visual is not summing values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489700#M133574</link>
      <description>&lt;P&gt;how can i use (Has one filter) funuction if i have multiple coulmns in my table?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 13:49:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489700#M133574</guid>
      <dc:creator>lawadaa</dc:creator>
      <dc:date>2023-10-22T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: grand total in table visual is not summing values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489701#M133575</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;The root cause for this behavior is that typical dax functions don't do "visual level calculations" and instead the calculation is done on filter context. In practice this means e.g. this:&lt;BR /&gt;&lt;BR /&gt;Data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt; &lt;SPAN&gt;4&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (9)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;Now, one could think that this will result in Average of 20 since (10+30)/2 = 20. However here is the end result:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;SPAN&gt;&lt;SPAN&gt;So (10 + 10 + 30) / 3 = 16,67&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Measure resulting in expected end result could be e.g. this:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt; &lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (9)'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table (9)'&lt;/SPAN&gt;&lt;SPAN&gt;[Dimension]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Average"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (9)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;SPAN&gt;[Average]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;This measure first creates aggregate table and then takes average of that table resulting in the expected 20.&lt;BR /&gt;&lt;BR /&gt;In your example you can use SUMX instead of AVERAGEX. So first create calculated table within your measure. Ypu can consider placing it into variable like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt; &lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; _vtable= &lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;('Table (9)','Table (9)'[Dimension],&lt;/SPAN&gt;&lt;SPAN&gt;"Average"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;('Table (9)'[Value])) &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(_vtable,[Average])&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;SPAN&gt;&lt;BR /&gt;In your case replace the calculated column and expression matching your table and then use SUMX.&lt;BR /&gt;&lt;BR /&gt;Here is a good article on the topic by sqlbi:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/summing-values-for-the-total/#:~:text=Summing%20values%20for%20the%20total%20-%20SQLBI%20DAX,value%20in%20the%20filter%20context%20of%20the%20total." target="_blank" rel="noopener"&gt;Summing values for the total - SQLBI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 22 Oct 2023 13:53:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grand-total-in-table-visual-is-not-summing-values-correctly/m-p/3489701#M133575</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2023-10-22T13:53:16Z</dc:date>
    </item>
  </channel>
</rss>

