<?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 values and return value if criteria is fullfiled in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206923#M116827</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;What is the direction and the cardinality of the relationship?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 09:54:15 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-04-26T09:54:15Z</dc:date>
    <item>
      <title>Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206899#M116823</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables: Order and Case and I would like the Case table to lookup the OrderStatus in the Order table. They are connected through OrderId. If all OrderId within the CaseId has status 2 or 3 the column should return 1 otherwise 2. Its important that all OrderId either has the status 2 or 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ordetstatus: 2 or 3 is = invoiced&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 09:35:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206899#M116823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-26T09:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206923#M116827</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;What is the direction and the cardinality of the relationship?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 09:54:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206923#M116827</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-26T09:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206946#M116830</link>
      <description>&lt;P&gt;One-One and Both&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 10:11:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3206946#M116830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-26T10:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207246#M116841</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Apologies for the late response. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Invoiced =
IF (
    1
        IN CALCULATETABLE (
            VALUES ( Order[OrderStatus] ),
            ALLEXCEPT ( Case, Case[CaseID] )
        ),
    0,
    1
)&lt;/LI-CODE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Invoiced =
IF (
    1
        IN SELECTCOLUMNS (
            FILTER ( ALL ( Order ), Order[CaseID] = Case[CaseID] ),
            "@OrderStatus", Order[OrderStatus]
        ),
    0,
    1
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 12:53:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207246#M116841</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-26T12:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207422#M116847</link>
      <description>&lt;P&gt;Thanks again! I managed to get the OrderStatus to the Case table but I´m still struggling on the code. I want to check if all the orders (can be multiple) within the same case has OrderStatus either 2 or 3 then return 1, otherwise 0. All orders need to have either 2 or 3 as OrderStatus to return 1.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 13:59:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207422#M116847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-26T13:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207457#M116856</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Invoiced =
IF (
    ISEMPTY (
        EXCEPT (
            SELECTCOLUMNS (
                FILTER ( ALL ( Order ), Order[CaseID] = Case[CaseID] ),
                "@OrderStatus", Order[OrderStatus]
            ),
            { 2, 3 }
        )
    ),
    0,
    1
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 14:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207457#M116856</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-26T14:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207543#M116862</link>
      <description>&lt;P&gt;Maybe I´m being a little bit inexplicit about the task. But I´´ve merged everything into one table. So right now I&lt;SPAN&gt;&amp;nbsp;want to check if all the orders (can be multiple) within the same case has either OrderStatus 2 or 3 then return 1, otherwise 0. All orders need to have either 2 or 3 as OrderStatus to return 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 14:51:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207543#M116862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-26T14:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207567#M116870</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have posted two answers and yet you did not specifically indicate what is wrong or what results are you getting. Would you please advise what results are getting out of the 2nd solution? I guess you need to switch position of 1 and 2 inside the IF statement&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 08:35:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3207567#M116870</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-28T08:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3210720#M117086</link>
      <description>&lt;P&gt;Hi, sorry for the late respond.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding the 2nd solution the code points towards both tables, but I merged them into one. It worked when I had two separate tables. Thank you! One thing I dont get regarding the code is this:&lt;/P&gt;&lt;P&gt;"@OrderStatus"&lt;/P&gt;&lt;P&gt;Can you explain what it does?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 07:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3210720#M117086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-28T07:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Vlookup multiple values and return value if criteria is fullfiled</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3210820#M117092</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This just the alias column name argument of the SELECTCOLUMNS function. The&amp;nbsp;@ sign is used as a standard when referencing a temporarily created column to be easily identified&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 08:41:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Vlookup-multiple-values-and-return-value-if-criteria-is/m-p/3210820#M117092</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-28T08:41:33Z</dc:date>
    </item>
  </channel>
</rss>

