<?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: Get lookup values based on multiple conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1431260#M26689</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="62908" data-lia-user-login="Krish89" class="lia-mention lia-mention-user"&gt;Krish89&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this calculated column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rep =
VAR vResult =
    IF (
        Data[Name] IN { "BLANK", "CN", "PERSON OR COMPANY'S NAME" },
        LOOKUPVALUE ( MF[Rep], MF[ID], Data[IDNew] ),
        LOOKUPVALUE ( MF[Rep], MF[ID], Data[ID] )
    )
RETURN
    IF ( ISBLANK ( vResult ), "UNASSIGNED", vResult )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2020 20:26:25 GMT</pubDate>
    <dc:creator>DataInsights</dc:creator>
    <dc:date>2020-10-13T20:26:25Z</dc:date>
    <item>
      <title>Get lookup values based on multiple conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1429961#M26660</link>
      <description>&lt;P&gt;Hello, I have an excel file with two sheets called Data and MF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;S.NONew : =IF(OR(D2="#";D2="NULL");C2;D2)&lt;/P&gt;&lt;P&gt;CombinedValue: = B2&amp;amp;A2&amp;amp;E2 (concatenation of ID ,IDNew, S.NONew)&lt;/P&gt;&lt;P&gt;Rep: = IFERROR(IF(OR(G2="BLANK";G2="CN";G2="PERSON OR COMPANY'S NAME");VLOOKUP(B2;MF!A:B;2;FALSE);VLOOKUP(A2;MF!A:B;2;FALSE));"UNASSIGNED")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to implement the S.NoNew, CombinedValue and Rep columns in Power BI desktop instead of in Excel.&lt;/P&gt;&lt;P&gt;I imported the data into Power BI and i created S.NoNew and CombinedValue columns but it would be great if someone can help in creating the Rep column in Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krishna.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 09:57:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1429961#M26660</guid>
      <dc:creator>Krish89</dc:creator>
      <dc:date>2020-10-13T09:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get lookup values based on multiple conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1431260#M26689</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="62908" data-lia-user-login="Krish89" class="lia-mention lia-mention-user"&gt;Krish89&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this calculated column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rep =
VAR vResult =
    IF (
        Data[Name] IN { "BLANK", "CN", "PERSON OR COMPANY'S NAME" },
        LOOKUPVALUE ( MF[Rep], MF[ID], Data[IDNew] ),
        LOOKUPVALUE ( MF[Rep], MF[ID], Data[ID] )
    )
RETURN
    IF ( ISBLANK ( vResult ), "UNASSIGNED", vResult )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 20:26:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1431260#M26689</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2020-10-13T20:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get lookup values based on multiple conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1432159#M26707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207275" data-lia-user-login="DataInsights" class="lia-mention lia-mention-user"&gt;DataInsights&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help!!&lt;/P&gt;&lt;P&gt;I tried the calculated column but I got the below error because in my MF table the ID column datatype is whole number where as in Data table all the columns are Text. So Lookup function is not working with this datatype mismatch.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if i change the data type of ID column in MF table to Text then the DAX query works perfectly fine.&lt;/P&gt;&lt;P&gt;Is it possible to convert the datatpye of ID column in MF table to Text when writing the dax code instead of changing it in Power query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krishna.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 06:12:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1432159#M26707</guid>
      <dc:creator>Krish89</dc:creator>
      <dc:date>2020-10-14T06:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get lookup values based on multiple conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1433477#M26740</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="62908" data-lia-user-login="Krish89" class="lia-mention lia-mention-user"&gt;Krish89&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's possible, but not recommended. Data types should be consistent throughout the data model. For example, the column Order Date should be a date data type throughout the data model. If Order Date is a date data type in some tables, and a text data type in other tables, you will encounter problems. I highly recommend having the same data type in both tables for the ID column.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 13:54:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-lookup-values-based-on-multiple-conditions/m-p/1433477#M26740</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2020-10-14T13:54:00Z</dc:date>
    </item>
  </channel>
</rss>

