<?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 Calculate final overall value for new column based on my custom order of another calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610007#M139543</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to work out how to get a final value based on a hierarchy/custom order (I have added a number for simplicity alpha-numeric ordering) from another column. Some records may only have one row per customer_id so they aren't an issue, but some other customer records may have multiple rows. Each of those row can have a different outcome value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the RANKX function unsuccessfully at this stage but I may be using the incorrect terminolgy here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I would like to occur (thanks in advance!)&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Individual_State&lt;/STRONG&gt; (NB this column is calculated)&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;**Expected column** Overall_State&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;abc&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;1. Shipped&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;cde&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;1. Shipped&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;cde&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;2. Paid&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;3. Ordered&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;4. Checked&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;4. Checked&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;hij&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;5. Confirmed&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;PAID&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;hij&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;2. Paid&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;PAID&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Tue, 02 Jan 2024 01:16:33 GMT</pubDate>
    <dc:creator>RYRY</dc:creator>
    <dc:date>2024-01-02T01:16:33Z</dc:date>
    <item>
      <title>Calculate final overall value for new column based on my custom order of another calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610007#M139543</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to work out how to get a final value based on a hierarchy/custom order (I have added a number for simplicity alpha-numeric ordering) from another column. Some records may only have one row per customer_id so they aren't an issue, but some other customer records may have multiple rows. Each of those row can have a different outcome value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the RANKX function unsuccessfully at this stage but I may be using the incorrect terminolgy here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I would like to occur (thanks in advance!)&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Customer_ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Individual_State&lt;/STRONG&gt; (NB this column is calculated)&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;**Expected column** Overall_State&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;abc&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;1. Shipped&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;cde&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;1. Shipped&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;cde&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;2. Paid&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;SHIPPED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;3. Ordered&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;4. Checked&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;efg&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;4. Checked&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;ORDERED&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;hij&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;5. Confirmed&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;PAID&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;hij&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;2. Paid&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#993366"&gt;PAID&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 02 Jan 2024 01:16:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610007#M139543</guid>
      <dc:creator>RYRY</dc:creator>
      <dc:date>2024-01-02T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate final overall value for new column based on my custom order of another calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610358#M139556</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667903" data-lia-user-login="RYRY" class="lia-mention lia-mention-user"&gt;RYRY&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;First, create atable to store the Status and Sequence Order&lt;BR /&gt;&lt;BR /&gt;&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;&lt;BR /&gt;Add the following calculated column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Overall State = 
VAR __Order = 
    MINX(
    ADDCOLUMNS(
        CALCULATETABLE( VALUES( Table02[Individual_State] ) , ALLEXCEPT( Table02 , Table02[Customer_ID] )),
        "Order" , LOOKUPVALUE( OrderStatus[Order] , OrderStatus[Status], Table02[Individual_State] )
    ),
    [Order]
    )
VAR __Result =  LOOKUPVALUE( OrderStatus[Status] , OrderStatus[Order], __Order )
RETURN
    __Result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 06:54:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610358#M139556</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-02T06:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate final overall value for new column based on my custom order of another calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610454#M139566</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667903" data-lia-user-login="RYRY" class="lia-mention lia-mention-user"&gt;RYRY&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please follow these steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use CALCULATE() to group by Customer_ID and then take the minimum value.&lt;/LI&gt;&lt;LI&gt;Use RIGHT(), based on "." Take the right half of the separation and then turn capitalization to get the results you want.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The DAX expression for the calculated column is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Overall_State = 
VAR _last_value = CALCULATE(MIN('Table'[Individual_State]),ALLEXCEPT('Table','Table'[Customer_ID]))
VAR _result = RIGHT(_last_value,LEN(_last_value)-SEARCH(".",'Table'[Individual_State]))
RETURN
UPPER(_result)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Yang&lt;BR /&gt;Community Support Team&lt;/P&gt;&lt;P&gt;If there is any post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&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;&amp;nbsp;&amp;nbsp;to help the other members find it more quickly.&lt;BR /&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Thanks a lot!&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 08:21:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3610454#M139566</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-02T08:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate final overall value for new column based on my custom order of another calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3611875#M139632</link>
      <description>&lt;P&gt;Awesome! So simple but I need to learn the 'ALLEXCEPT' function a bit more.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 22:57:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-final-overall-value-for-new-column-based-on-my-custom/m-p/3611875#M139632</guid>
      <dc:creator>RYRY</dc:creator>
      <dc:date>2024-01-02T22:57:17Z</dc:date>
    </item>
  </channel>
</rss>

