<?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 Lookup cost price based on 4 column values matching in another row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3168856#M114140</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need some help on how to write a measure to find a price for a line item in a table containing all transactions, including both Sales orders and purchase orders.&lt;/P&gt;&lt;P&gt;The link between the Sale Order Price and purchase Order price is 4 values listed on the sale order line and what I want to find is the Purchase Order price to calculate profit.&lt;/P&gt;&lt;P&gt;The link between Sales order price and Purchase order price is Supplier PO+Item+Product Number+QTY.&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;Transaction&lt;/TD&gt;&lt;TD&gt;Product Number&lt;/TD&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Supplier PO&lt;/TD&gt;&lt;TD&gt;QTY&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;539069&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;539075&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Sales Order&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;539075&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;Purchase Order&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the above example I would need to find Price 80 as this match the link&amp;nbsp;Supplier PO+Item+Product Number+QTY&lt;/P&gt;&lt;P&gt;Appreciate some help with this.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 08:52:49 GMT</pubDate>
    <dc:creator>NetromEner</dc:creator>
    <dc:date>2023-04-03T08:52:49Z</dc:date>
    <item>
      <title>Lookup cost price based on 4 column values matching in another row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3168856#M114140</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need some help on how to write a measure to find a price for a line item in a table containing all transactions, including both Sales orders and purchase orders.&lt;/P&gt;&lt;P&gt;The link between the Sale Order Price and purchase Order price is 4 values listed on the sale order line and what I want to find is the Purchase Order price to calculate profit.&lt;/P&gt;&lt;P&gt;The link between Sales order price and Purchase order price is Supplier PO+Item+Product Number+QTY.&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;Transaction&lt;/TD&gt;&lt;TD&gt;Product Number&lt;/TD&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Supplier PO&lt;/TD&gt;&lt;TD&gt;QTY&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;539069&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;539075&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Sales Order&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;539075&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;Purchase Order&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the above example I would need to find Price 80 as this match the link&amp;nbsp;Supplier PO+Item+Product Number+QTY&lt;/P&gt;&lt;P&gt;Appreciate some help with this.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 08:52:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3168856#M114140</guid>
      <dc:creator>NetromEner</dc:creator>
      <dc:date>2023-04-03T08:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup cost price based on 4 column values matching in another row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169182#M114166</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470604" data-lia-user-login="NetromEner" class="lia-mention lia-mention-user"&gt;NetromEner&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Supplier PO is not matching. However, assuming this is just a typo mistake, please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Cost Price =
MAXX (
    FILTER (
        CALCULATETABLE (
            'Table',
            ALLEXCEPT (
                'Table',
                'Table'[Supplier PO],
                'Table'[Item],
                'Table'[Product Number],
                'Table'[QTY]
            )
        ),
        'Table'[Type] = "Purchase Order"
    ),
    'Table'[Price]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Apr 2023 11:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169182#M114166</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-03T11:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup cost price based on 4 column values matching in another row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169200#M114169</link>
      <description>&lt;P&gt;Hi tamerj1 and thanks for your feedback. You see the problem is that First line refers to Supplier PO 539075, which again is listed as a separate line with 539075 as transaction ID. So I want to find with price where&amp;nbsp;Supplier PO+Item+Product Number+QTY = Transaction+Item+Product Number+QTY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this explains the problem I am facing, I have to swicth Coloumn when looking up the price for connected Purchase Order&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 11:42:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169200#M114169</guid>
      <dc:creator>NetromEner</dc:creator>
      <dc:date>2023-04-03T11:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup cost price based on 4 column values matching in another row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169263#M114180</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470604" data-lia-user-login="NetromEner" class="lia-mention lia-mention-user"&gt;NetromEner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Cost Price =&lt;BR /&gt;MAXX (&lt;BR /&gt;FILTER (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;'Table',&lt;BR /&gt;ALLEXCEPT ( 'Table', 'Table'[Item], 'Table'[Product Number], 'Table'[QTY] )&lt;BR /&gt;),&lt;BR /&gt;'Table'[Transaction] = EARLIER ( 'Table'[Supplier PO] )&lt;BR /&gt;&amp;amp;&amp;amp; 'Table'[Type] = "Purchase Order"&lt;BR /&gt;),&lt;BR /&gt;'Table'[Price]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 12:05:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookup-cost-price-based-on-4-column-values-matching-in-another/m-p/3169263#M114180</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-03T12:05:42Z</dc:date>
    </item>
  </channel>
</rss>

