<?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: Lookupvalue for a Search String in Tabular Model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1897929#M40923</link>
    <description>&lt;P&gt;For those who may stumble upon similar issue -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a lot of reading everywhere, found the below link and especially in comments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A combination of a various solutions in comments helped.&lt;/P&gt;&lt;P&gt;&lt;A href="https://p3adaptive.com/2014/01/containsx-finding-if-a-value-in-table-1-has-a-matching-value-in-table-2/" target="_self"&gt;Solution Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 04:58:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-06-14T04:58:23Z</dc:date>
    <item>
      <title>Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892814#M40771</link>
      <description>&lt;P&gt;Hi seeking assistance with Tabular Model DAX query. Sorry for posting in PBI forum. I will be mgrating this solution to existng PBI, but the roadmap for it is 6-9 month away.&lt;/P&gt;&lt;P&gt;I've a Lookup/Reference table which provides the Sport Items and Sports related to it. Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SPORT_ITEM             SPORT
_____________________________
BaseballBAT           Baseball
BASEBALL BAT          Baseball
Baseball Glove        Baseball
Helmet                Football
Shoulderpads          Football
Shoulder Pads         Football&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Then I have a table which has descriptive column. Like&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ITEM_DESCRIPTION
__________________
Baseballbat Needed
Baseball Bat required
Helmet wanted
ShoulderPads provided
Shoulder Pads needed&lt;/LI-CODE&gt;&lt;P&gt;What I've been asked to do is - Lookup the value under ITEM_DESC and to the string matching SPORT_ITEM and return SPORT name column.&lt;/P&gt;&lt;P&gt;So I should see&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ITEM_DESCRIPTION            SPORT
__________________________________
Baseballbat Needed          Baseball
Baseball Bat required       Baseball
Helmet wanted               Football
ShoulderPads provided       Football
Shoulder Pads needed        Football&lt;/LI-CODE&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Unfortunately there is no relationship between the 2 tables. This lookup is the only way to join.&lt;/LI&gt;&lt;LI&gt;I cannot do this join in the data source because I'm not allowed by the DBAs. Long story, (you didnt hear me say red tape).&lt;/LI&gt;&lt;LI&gt;I have tried LOOKUPVALUE. Though, it returns expected value only when there is exact match to search string.&lt;/LI&gt;&lt;LI&gt;I need to match on Substring.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="comment-copy"&gt;I tried using SEARCH along with LOOKUPVALUE, in 3rd argument. But I cannot because for SEARCH the lookup table is out of scope. it will only read from the table it is used in.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Since there is no join, I cannot use Related, right? And since this is Tabular Model, there is no CONTAINSVALUE.&lt;/P&gt;&lt;P&gt;Please let me know how this can be achieved.&lt;/P&gt;&lt;P&gt;Any help is much appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:19:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892814#M40771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T08:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892854#M40772</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, you would need the same strings (as Power BI is case sensitive) in both the columns. For this, you can go to the Query editor-&amp;gt; select SPORT_ITEM column from table 1 and UPPERCASE every letter.&lt;BR /&gt;Similarly, first go to the ITEM_DESCRIPTION column of second table and split it by a delimiter " " - Rightmost (space).&lt;BR /&gt;You would get a new column with just the SPORT item names, Rename that to ITEMS.&lt;/P&gt;&lt;P&gt;Now UPPERCASE this column.&lt;/P&gt;&lt;P&gt;Close and Apply the changes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now, use your LOOKUPVALUE DAX on these columns:&lt;BR /&gt;new column in second table:&lt;BR /&gt;SPORT= LOOKUPVALUE( table_1(SPORT), table_1( SPORT_ITEM), table_2(ITEMS))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would create the new column with SPORTS name in table 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If I answer your question, mark it as a solution.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892854#M40772</guid>
      <dc:creator>Tanushree_Kapse</dc:creator>
      <dc:date>2021-06-10T08:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892875#M40775</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281080" data-lia-user-login="Tanushree_Kapse" class="lia-mention lia-mention-user"&gt;Tanushree_Kapse&lt;/a&gt;&amp;nbsp;for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesnot work. Like I mentioned, I tried this, but it matches only where the match is EXACT. However I'm looking for matching a substring of the column ITEM_DESCRIPTION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ITEM_DESCRIPTION column can have other text in there. Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Baseball needed
Baseball
Helmet wanted&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also this is Tabular Model. Though solution should be via DAX.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:43:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892875#M40775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T08:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892883#M40776</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, that's why we are CAPITALIZING every letter and splitting the column to get the substring seperated.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:43:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892883#M40776</guid>
      <dc:creator>Tanushree_Kapse</dc:creator>
      <dc:date>2021-06-10T08:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892902#M40778</link>
      <description>&lt;P&gt;But splitting cannot be 100%. i.e. I can have spaces in between for the text I need to search.&lt;/P&gt;&lt;P&gt;base ball&lt;/P&gt;&lt;P&gt;Shoulder pad&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 08:45:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892902#M40778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892986#M40780</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, In that case: Use UPPER(Column_name) to convert every alphabet to uppercase.&lt;BR /&gt;And for splitting the column using delimiter for rightmost space-&lt;BR /&gt;&lt;SPAN&gt;RIGHT([ITEMS_DESCRIPTION],SEARCH(" ",[ITEMS_DESCRIPTION]),-1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 09:08:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1892986#M40780</guid>
      <dc:creator>Tanushree_Kapse</dc:creator>
      <dc:date>2021-06-10T09:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1893142#M40782</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281080" data-lia-user-login="Tanushree_Kapse" class="lia-mention lia-mention-user"&gt;Tanushree_Kapse&lt;/a&gt;&amp;nbsp; - I'll come back to this later. A priority 2 incident has happened. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other thoughts in meanwhile are welcome.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 09:56:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1893142#M40782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-10T09:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1896677#M40871</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281080" data-lia-user-login="Tanushree_Kapse" class="lia-mention lia-mention-user"&gt;Tanushree_Kapse&lt;/a&gt;&amp;nbsp;Hi I'm back on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I forgot to specify that it is not necessary that ITEM_DESCRIPTION will contain 1 part at the end that can be discarded. It can be like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Baseball bat wanted by Team AZ
BaseballBat needed TeamCA
Base ball
Team NY Helmet&lt;/LI-CODE&gt;&lt;P&gt;It can be any weird combination.&lt;/P&gt;&lt;P&gt;Hence I am specifcally looking for a lookup on part of string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for not being clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 21:43:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1896677#M40871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-11T21:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lookupvalue for a Search String in Tabular Model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1897929#M40923</link>
      <description>&lt;P&gt;For those who may stumble upon similar issue -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a lot of reading everywhere, found the below link and especially in comments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A combination of a various solutions in comments helped.&lt;/P&gt;&lt;P&gt;&lt;A href="https://p3adaptive.com/2014/01/containsx-finding-if-a-value-in-table-1-has-a-matching-value-in-table-2/" target="_self"&gt;Solution Link&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 04:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Lookupvalue-for-a-Search-String-in-Tabular-Model/m-p/1897929#M40923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-14T04:58:23Z</dc:date>
    </item>
  </channel>
</rss>

