<?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 MAX function with multiple conditions for shape map in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959096#M153645</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;I am creating a shape map with a color saturation of the highest incentives for each state. I am ranking some incentives as more valuable than others (rank column). I want to create a measure that calculates the max of [High] that prioritizes values labeled rank 1 first. If the value in [High] is not a rank 1, then the formula should calculate the max of [High] values with a rank 2 (...and so on up to a rank 5).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was able to create a calculated column that returns the max [High] values based on the rank.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;But, I need to be able to do this through a measure to apply to my shape map.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I have tested measures with nested IF statements as well as SWITCH TRUE, and cannot get it to calculate properly.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is a sample of the data:&amp;nbsp;&lt;A href="https://docs.google.com/spreadsheets/d/1W6tUXGizGtjOv7QvsgOa6mYTPb3cQ4HnVDKnsiGKsVg/edit?usp=sharing" target="_self"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Example Results: The map should show CO's max incentive as $2,400 with no filters. If I add a filter removing rank 1, the max incentive should update to $2,500.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this is possible!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 May 2024 23:22:07 GMT</pubDate>
    <dc:creator>madisonb</dc:creator>
    <dc:date>2024-05-29T23:22:07Z</dc:date>
    <item>
      <title>MAX function with multiple conditions for shape map</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959096#M153645</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;I am creating a shape map with a color saturation of the highest incentives for each state. I am ranking some incentives as more valuable than others (rank column). I want to create a measure that calculates the max of [High] that prioritizes values labeled rank 1 first. If the value in [High] is not a rank 1, then the formula should calculate the max of [High] values with a rank 2 (...and so on up to a rank 5).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was able to create a calculated column that returns the max [High] values based on the rank.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;But, I need to be able to do this through a measure to apply to my shape map.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I have tested measures with nested IF statements as well as SWITCH TRUE, and cannot get it to calculate properly.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Here is a sample of the data:&amp;nbsp;&lt;A href="https://docs.google.com/spreadsheets/d/1W6tUXGizGtjOv7QvsgOa6mYTPb3cQ4HnVDKnsiGKsVg/edit?usp=sharing" target="_self"&gt;Link&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Example Results: The map should show CO's max incentive as $2,400 with no filters. If I add a filter removing rank 1, the max incentive should update to $2,500.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this is possible!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 May 2024 23:22:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959096#M153645</guid>
      <dc:creator>madisonb</dc:creator>
      <dc:date>2024-05-29T23:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: MAX function with multiple conditions for shape map</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959360#M153650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="751063" data-lia-user-login="madisonb" class="lia-mention lia-mention-user"&gt;madisonb&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;BR /&gt;Here I create a measure for your reference:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _currentState =
    SELECTEDVALUE ( 'Table'[State] )
VAR _MinRank =
    CALCULATE (
        MIN ( 'Table'[Rank] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[State] = _currentState )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[High] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[State] = _currentState
                &amp;amp;&amp;amp; 'Table'[Rank] = _MinRank
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;The result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 02:36:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959360#M153650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-30T02:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: MAX function with multiple conditions for shape map</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959612#M153656</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be working perfectly! Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 04:19:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/MAX-function-with-multiple-conditions-for-shape-map/m-p/3959612#M153656</guid>
      <dc:creator>madisonb</dc:creator>
      <dc:date>2024-05-30T04:19:05Z</dc:date>
    </item>
  </channel>
</rss>

