<?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 Calculated Column Based on Max Index of other Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633039#M77092</link>
    <description>&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I want to create a calculated column based on the Max index number of another column.&lt;/P&gt;&lt;P&gt;Specifically for the table below:&lt;/P&gt;&lt;P&gt;For the combination Attribute 1 - Attribute 2 (ex A-X),&amp;nbsp;&amp;nbsp;to have the result of the amount (ie 10) next to the&amp;nbsp;&lt;SPAN&gt;max Index ( ie 3),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the others as blanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For B-Z, amount 24 next to Index 6 etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kostas&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 08:46:03 GMT</pubDate>
    <dc:creator>kostask</dc:creator>
    <dc:date>2022-07-12T08:46:03Z</dc:date>
    <item>
      <title>Calculated Column Based on Max Index of other Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633039#M77092</link>
      <description>&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;I want to create a calculated column based on the Max index number of another column.&lt;/P&gt;&lt;P&gt;Specifically for the table below:&lt;/P&gt;&lt;P&gt;For the combination Attribute 1 - Attribute 2 (ex A-X),&amp;nbsp;&amp;nbsp;to have the result of the amount (ie 10) next to the&amp;nbsp;&lt;SPAN&gt;max Index ( ie 3),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the others as blanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For B-Z, amount 24 next to Index 6 etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kostas&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 08:46:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633039#M77092</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-12T08:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column Based on Max Index of other Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633126#M77100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please try the dax code provided below as a calculated column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Max Amount = 
Var Attribute1= 'Table'[Attribute 1]
Var Attribute2= 'Table'[Attribute 2]
Var AttributeFilter = Filter('Table','Table'[Attribute 1] =Attribute1 &amp;amp;&amp;amp; 'Table'[Attribute 2] =Attribute2)
Var IndexMax = Calculate(max('Table'[Index]),AttributeFilter)
Var Result = If(IndexMax= 'Table'[Index],'Table'[Amount],BLANK())

Return Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this doesn't solve your problem please give an update so that I can work on it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this post helps, then please consider accepting it as the solution to help the other members find it more quickly.&lt;BR /&gt;Regards,&lt;BR /&gt;Atma.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:10:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633126#M77100</guid>
      <dc:creator>Dhacd</dc:creator>
      <dc:date>2022-07-12T09:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column Based on Max Index of other Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633156#M77102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="210525" data-lia-user-login="kostask" class="lia-mention lia-mention-user"&gt;kostask&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How about this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the DAX code for the calculated column:&lt;/P&gt;&lt;PRE&gt;Result = 
IF ( 
    RANKX ( 
        FILTER ( 
            'Table', 
            'Table'[Attribute1] = EARLIER ( 'Table'[Attribute1] ) &amp;amp;&amp;amp; 'Table'[Attribute2] = EARLIER ( 'Table'[Attribute2] )
        ),
        'Table'[Index],
        , DESC
        , DENSE
    ) = 1, 
    Table[Amount],
    BLANK()
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 09:21:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633156#M77102</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-07-12T09:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column Based on Max Index of other Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633709#M77148</link>
      <description>&lt;P&gt;Great work!&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="356327" data-lia-user-login="Dhacd" class="lia-mention lia-mention-user"&gt;Dhacd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 12:51:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-Based-on-Max-Index-of-other-Column/m-p/2633709#M77148</guid>
      <dc:creator>kostask</dc:creator>
      <dc:date>2022-07-12T12:51:25Z</dc:date>
    </item>
  </channel>
</rss>

