<?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 Totals Question Pls in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157977#M17742</link>
    <description>&lt;P&gt;Hi all, I have this table.&lt;/P&gt;&lt;P&gt;Actual, Calc and Max are measures. Max is the value that is greater between Actual and Calc&lt;/P&gt;&lt;P&gt;Max rows are correct but the total is not. I was able to use "Isfilter" to get the correct condition under the "test" column but cant get to correctly total the max column. Any suggestions would be greatly appreciated. Thanks so much!&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jun 2020 20:30:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-06-14T20:30:17Z</dc:date>
    <item>
      <title>Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157977#M17742</link>
      <description>&lt;P&gt;Hi all, I have this table.&lt;/P&gt;&lt;P&gt;Actual, Calc and Max are measures. Max is the value that is greater between Actual and Calc&lt;/P&gt;&lt;P&gt;Max rows are correct but the total is not. I was able to use "Isfilter" to get the correct condition under the "test" column but cant get to correctly total the max column. Any suggestions would be greatly appreciated. Thanks so much!&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 20:30:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157977#M17742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-14T20:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157981#M17743</link>
      <description>&lt;P&gt;You haven't mentioned what you expect the total to be for the max column. Max, average, something else?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 20:32:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157981#M17743</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-14T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157983#M17744</link>
      <description>&lt;P&gt;Hello, oh sorry. Sum is what I need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 20:34:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1157983#M17744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-14T20:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158076#M17749</link>
      <description>&lt;P&gt;This was a nice challenge.&amp;nbsp; Here's my approach - there are probably better ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Max = if(
    HASONEVALUE('Table (3)'[Prod])
    ,max(selectedvalue('Table (3)'[Actual]),SELECTEDVALUE('Table (3)'[Calc]))
    ,sumx(Filter('Table (3)','Table (3)'[Actual]&amp;gt;'Table (3)'[Calc]),'Table (3)'[Actual])
    +sumx(Filter('Table (3)','Table (3)'[Actual]&amp;lt;='Table (3)'[Calc]),'Table (3)'[Calc])
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you look at the rows, just use the regular max() logic, but for the totals distinguish between the cases where the actual is bigger than the calc, and where the actual is smaller or equal.&amp;nbsp; The sum of these two scenarios gives the desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: Additional filters may need to be applied depending on your data model.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 23:43:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158076#M17749</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-14T23:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158126#M17752</link>
      <description>&lt;P&gt;Thanks very much for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After modifying your equation a little I was able to make it work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the final eq&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if(ISFILTERED(Table1[Prod]),sumx(Table1,[max]),CALCULATE(SUMX(Table1,[max]),ALL(Table1[Prod])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;More importantly, I understand the concept better now. Thanks very much!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jun 2020 01:22:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158126#M17752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-15T01:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158255#M17753</link>
      <description>&lt;P&gt;Then you will probably like this old article&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/" target="_blank"&gt;https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 02:23:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158255#M17753</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-15T02:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158653#M17755</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its more simple when using an interator:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_MaxOfColumns = MAXX('Table';IF('Table'[Actual]&amp;gt;'Table'[Calc];'Table'[Actual];'Table'[Calc]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As seen here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark as solution if this is what you are looking for.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 06:11:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1158653#M17755</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-15T06:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1160059#M17765</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;the ask was to show the sum of the maxima, not the max of the max.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 12:28:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1160059#M17765</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-15T12:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1165724#M17896</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;Thanks for the heads up. Its a small change to make it working:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_SumofMaxOfColumns = SUMX('Table';IF('Table'[Actual]&amp;gt;'Table'[Calc];'Table'[Actual];'Table'[Calc]))&lt;/LI-CODE&gt;&lt;P&gt;As seen here:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, pls let us know if this is what you are looking for.&lt;/P&gt;&lt;P&gt;Kind regards, Steve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. file has been updated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 10:39:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1165724#M17896</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-17T10:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Totals Question Pls</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1169241#M17994</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, does this work for you?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 15:26:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Totals-Question-Pls/m-p/1169241#M17994</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-18T15:26:07Z</dc:date>
    </item>
  </channel>
</rss>

