<?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: Power Pivot Identify Month with Maximum Amount in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110986#M109891</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="468033" data-lia-user-login="BaldAccountant" class="lia-mention lia-mention-user"&gt;BaldAccountant&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Max Month :=&lt;BR /&gt;MAXX (&lt;BR /&gt;TOPN ( 1, VALUES ( Data[Date (Month)] ), CALCULATE ( COUNT ( Data[Case] ) ) ),&lt;BR /&gt;Data[Date (Month)]&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 18:27:08 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-03-03T18:27:08Z</dc:date>
    <item>
      <title>Power Pivot Identify Month with Maximum Amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110855#M109871</link>
      <description>&lt;P&gt;I am working in Power Pivot.&lt;/P&gt;&lt;P&gt;I have made a sample file&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/5z9t0adnmw4pbbbo3czz4/Test-Max-Name.xlsx?dl=0&amp;amp;rlkey=0mg4i5l7ytatj31e7emjadfpf" target="_blank"&gt;https://www.dropbox.com/scl/fi/5z9t0adnmw4pbbbo3czz4/Test-Max-Name.xlsx?dl=0&amp;amp;rlkey=0mg4i5l7ytatj31e7emjadfpf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a measure to calculate the max monthly value for various calculations - total cases, net profit per case, etc.&lt;/P&gt;&lt;P&gt;The user can choose which calculation they want the max value for.&lt;/P&gt;&lt;P&gt;But what I want to do is also identify the name of the month with the maximum value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;&lt;P&gt;For example if you choose cases from the drop down in cell b18, the max of 182 shows in cell c20.&amp;nbsp; I can look at the pivot table and see that is the amount for the month of Oct, but I want a formula to tell which month has the max value for that calculation&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 16:52:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110855#M109871</guid>
      <dc:creator>BaldAccountant</dc:creator>
      <dc:date>2023-03-03T16:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power Pivot Identify Month with Maximum Amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110894#M109878</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="468033" data-lia-user-login="BaldAccountant" class="lia-mention lia-mention-user"&gt;BaldAccountant&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Unable to access your file, supposing&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Cases is a measure,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;try like:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MaxMonth =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _maxcase =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MAXX(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ALL(TableName[Month]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN&gt;Cases&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; VALUES(TableName[Month]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; [Cases] = _maxcase&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 17:21:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110894#M109878</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-03-03T17:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Power Pivot Identify Month with Maximum Amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110958#M109887</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting an error - a table of multiple values was supplied where a single value was expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry the link to dropbox is not working.&amp;nbsp; It says I cab share it with anyone who has the link...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it helps this is the measure that I used to get the max amount&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Max:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;var&lt;/SPAN&gt; &lt;SPAN class=""&gt;totalmonth&lt;/SPAN&gt;&lt;SPAN class=""&gt; =&lt;/SPAN&gt;&lt;SPAN class=""&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data,Data[Date (Month)],&lt;/SPAN&gt;&lt;SPAN class=""&gt;"max1"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Analysis[Analysis Measure]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;maxx&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;totalmonth&lt;/SPAN&gt;&lt;SPAN class=""&gt;,[max1])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;and here is the analysis measure - I am sure there is probably a better way to do this, but I am relatively new to dax&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;SPAN class=""&gt;Analysis Measure:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN class=""&gt;([Selected Analysis],&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Cases"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Case]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Charges"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Charge]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Cost"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Cost]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Charges per Case"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Charge]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Case]),0),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Cost per Case"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Cost]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;COUNT&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Case]),0),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Net Profit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Charge])-&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Cost]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Net Profit per Case"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Charge])-&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Cost]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Case]),0),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Minutes"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Time]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Net Profit per Hour"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt;divide&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Charge])-&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Cost]),&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Data[Time]),0)*60,0)&lt;/SPAN&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The idea is the user can choose what type of calculations they want to see using the analysis measure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Here is another link in case the previous one was just bad&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A title="New Link" href="https://www.dropbox.com/scl/fi/5z9t0adnmw4pbbbo3czz4/Test-Max-Name.xlsx?dl=0&amp;amp;rlkey=0mg4i5l7ytatj31e7emjadfpf" target="_self"&gt;https://www.dropbox.com/scl/fi/5z9t0adnmw4pbbbo3czz4/Test-Max-Name.xlsx?dl=0&amp;amp;rlkey=0mg4i5l7ytatj31e7emjadfpf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 17:57:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110958#M109887</guid>
      <dc:creator>BaldAccountant</dc:creator>
      <dc:date>2023-03-03T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Power Pivot Identify Month with Maximum Amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110986#M109891</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="468033" data-lia-user-login="BaldAccountant" class="lia-mention lia-mention-user"&gt;BaldAccountant&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Max Month :=&lt;BR /&gt;MAXX (&lt;BR /&gt;TOPN ( 1, VALUES ( Data[Date (Month)] ), CALCULATE ( COUNT ( Data[Case] ) ) ),&lt;BR /&gt;Data[Date (Month)]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 18:27:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3110986#M109891</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-03T18:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Power Pivot Identify Month with Maximum Amount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3111019#M109894</link>
      <description>&lt;P&gt;&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;&amp;nbsp;That worked, but just in case anyone else has this question and is looking at this thread, your solution was just looking at cases, not the dynamic measure of Analysis Measure, so the only thing you could calculate the max month for was cases.&amp;nbsp; I substituted that measure for the count(data[case]) and it worked fine.&amp;nbsp; Thank you very much again.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 18:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-Pivot-Identify-Month-with-Maximum-Amount/m-p/3111019#M109894</guid>
      <dc:creator>BaldAccountant</dc:creator>
      <dc:date>2023-03-03T18:55:57Z</dc:date>
    </item>
  </channel>
</rss>

