<?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: Max Function Aggregate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003585#M101522</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="482408" data-lia-user-login="Altonga" class="lia-mention lia-mention-user"&gt;Altonga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming you need to sum over subcategory and average ober subjects:&lt;/P&gt;
&lt;P&gt;%Trained =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;VALUES ( 'Results'[Chapter] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUMX (&lt;BR /&gt;VALUES ( 'Results'[Subchapter] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( 'Results'[Test1%] ) + MAX ( 'Results'[Test2%] )&lt;BR /&gt;+ MAX ( 'Results'[Test3%] )&lt;BR /&gt;+ MAX ( 'Results'[Test4%] )&lt;BR /&gt;+ MAX ( 'Results'[Test5%] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2023 14:22:56 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-01-05T14:22:56Z</dc:date>
    <item>
      <title>Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003514#M101515</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having some issues with a training tracker that I am building, I want to track progress of students from 'tests' that they carry out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test1 = 10%&lt;/P&gt;&lt;P&gt;Test2 = 20%&lt;/P&gt;&lt;P&gt;Test3 = 30%&lt;/P&gt;&lt;P&gt;Test4 = 20%&lt;/P&gt;&lt;P&gt;Test5 = 20%&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Total = 100%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each subject has numerous subcategories within it which build up to an overall percentage within this subject, one issue is that the students can complete the same tests multiple times and I only want to identify one entry so I have used the below MAX fuction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;%Trained =&lt;/P&gt;&lt;P&gt;MAX ( 'Results'[Test1%] ) + MAX ( 'Results'[Test2%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test3%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test4%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test5%] )&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked to gain the correct percentage for one individual subcategory but when it came to aggregating over the numerous subcategories the max function is throwing off the calculation. This is what I tried to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;%TrainedAggregate = Divide(&lt;/P&gt;&lt;P&gt;MAX ( 'Results'[Test1%] ) + MAX ( 'Results'[Test2%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test3%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test4%] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + MAX ( 'Results'[Test5%] ) , [CountSubjectSubcategory])&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed the information due to sensitivity, The first image as you can see gives the figure I would expect, on the second however when I am aggregating over 12 subcategories it is only picking up 100% as the max when in theory it would be 1200%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 13:55:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003514#M101515</guid>
      <dc:creator>Altonga</dc:creator>
      <dc:date>2023-01-05T13:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003585#M101522</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="482408" data-lia-user-login="Altonga" class="lia-mention lia-mention-user"&gt;Altonga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;assuming you need to sum over subcategory and average ober subjects:&lt;/P&gt;
&lt;P&gt;%Trained =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;VALUES ( 'Results'[Chapter] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUMX (&lt;BR /&gt;VALUES ( 'Results'[Subchapter] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( 'Results'[Test1%] ) + MAX ( 'Results'[Test2%] )&lt;BR /&gt;+ MAX ( 'Results'[Test3%] )&lt;BR /&gt;+ MAX ( 'Results'[Test4%] )&lt;BR /&gt;+ MAX ( 'Results'[Test5%] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 14:22:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003585#M101522</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-05T14:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003670#M101528</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;, thank you for your reply, this is so close to the desired outcome! So it is now displaying correct percentages for all of the subchapters added up but it isn't showing the aggregated value. Is there a way to add to this code to divide by count of subchapters selected?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 14:59:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003670#M101528</guid>
      <dc:creator>Altonga</dc:creator>
      <dc:date>2023-01-05T14:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003684#M101529</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="482408" data-lia-user-login="Altonga" class="lia-mention lia-mention-user"&gt;Altonga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please share a screenshot?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 15:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003684#M101529</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-05T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003750#M101540</link>
      <description>&lt;P&gt;Can you try to use (show value as Percent of Grand Total) in the Visualization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 15:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003750#M101540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-05T15:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003779#M101542</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;As you can see below for the first student 120% is correct for how much they have scored over all of the subcategories but I am after an aggregation of this so in theory Student one would be displaying &lt;STRONG&gt;10%.&amp;nbsp;&lt;/STRONG&gt;Apologies as my knowledge isn't very extensive but hoping it would be an easy fix! &lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 15:34:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003779#M101542</guid>
      <dc:creator>Altonga</dc:creator>
      <dc:date>2023-01-05T15:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Max Function Aggregate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003808#M101544</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="482408" data-lia-user-login="Altonga" class="lia-mention lia-mention-user"&gt;Altonga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%Trained =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AVERAGEX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VALUES ( 'Results'[Chapter] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AVERAGEX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VALUES ( 'Results'[Subchapter] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MAX ( 'Results'[Test1%] ) + MAX ( 'Results'[Test2%] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+ MAX ( 'Results'[Test3%] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+ MAX ( 'Results'[Test4%] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+ MAX ( 'Results'[Test5%] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 15:42:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Max-Function-Aggregate/m-p/3003808#M101544</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-05T15:42:48Z</dc:date>
    </item>
  </channel>
</rss>

