<?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: Vlookup, multiple filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4007966#M157165</link>
    <description>Thank you so much, that worked seamlessly. Much appreciated. Marcy</description>
    <pubDate>Tue, 25 Jun 2024 01:43:34 GMT</pubDate>
    <dc:creator>maashi</dc:creator>
    <dc:date>2024-06-25T01:43:34Z</dc:date>
    <item>
      <title>Vlookup, multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4000835#M155893</link>
      <description>&lt;P&gt;I have been trying to replicate something I had been doing very manually on Excel, involving a VLOOKUP then counting non blanks in the result. I have attached the sample data for that purpose, and this is the working to replicate it in Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Working Column =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_order = 'Table2_2'[Original Sales Order]&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;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;('Table2_2','Table2_2'[Sales Order No]=_order),'Table2_2'[Sales Order No])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;New Measure :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NCP on NCP =&amp;nbsp;DISTINCTCOUNT('Table2_2'[Working Column])&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://altusnzltd-my.sharepoint.com/:x:/g/personal/marcy_henderson_altus_co_nz/EUMi3tVEaBlHm0qIx0aJDfIBh6W-sWi-294kgS-vnjp9GA?e=c1m8un" target="_self"&gt;Sample Data&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But then I realised, the sample data has already been filtered out once. How do I add in another filter so I only need to use one working column (If possible)?&lt;/DIV&gt;&lt;DIV&gt;Basically, in the return part of the working column, as well as looking up the 'original order number' in earlier lines to see if it has already appeared, it also needs to look up to see if order type of the earlier order number matches one of two specific&amp;nbsp; types. I tried using lookupvalue to create a second working column (to look up the first working column result to see if it is the correct sales order type) and the result was just a mess, because each sales order can appear multiple times (although in the real original data there is another identifier column to show what the line number is in each sales order number).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have added the sales order type in the sample data column, have made it all one type (because that is correct for this data) but what if there are other sales order types? And I don't want those included in the maxx filter? I guess to summarise, how do i put in a second filter into the maxx function so that not only is it looking for the var to have appeared earlier in a different column, it also looks to make sure the sales order type is correct?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this explanation is clear enough and thanks for the help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2024 00:58:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4000835#M155893</guid>
      <dc:creator>maashi</dc:creator>
      <dc:date>2024-06-20T00:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup, multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4003517#M156182</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="758931" data-lia-user-login="maashi" class="lia-mention lia-mention-user"&gt;maashi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I can not see the sales order type in the sample data.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Based on the description, try to use the following dax formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Working Column =
VAR _order = 'Table2_2'[Original Sales Order]
RETURN
    MAXX(
        FILTER(
            'Table2_2',
            'Table2_2'[Sales Order No] = _order &amp;amp;&amp;amp;
            'Table2_2'[Sales Order Type] IN {"Type1", "Type2"}
        ),
        'Table2_2'[Sales Order No]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this 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;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 07:34:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4003517#M156182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-21T07:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup, multiple filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4007966#M157165</link>
      <description>Thank you so much, that worked seamlessly. Much appreciated. Marcy</description>
      <pubDate>Tue, 25 Jun 2024 01:43:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-filters/m-p/4007966#M157165</guid>
      <dc:creator>maashi</dc:creator>
      <dc:date>2024-06-25T01:43:34Z</dc:date>
    </item>
  </channel>
</rss>

