<?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: Calculated Column to Check if Field CONTAINS Value From Another Table Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2646543#M77876</link>
    <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237748" data-lia-user-login="jereaallikko" class="lia-mention lia-mention-user"&gt;jereaallikko&lt;/a&gt;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2022 05:59:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-19T05:59:29Z</dc:date>
    <item>
      <title>Calculated Column to Check if Field CONTAINS Value From Another Table Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2637901#M77378</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a calculated column to check if a column contains value from mapping table column, if not, then to check another column whether it contains value from mapping table column. Let me explain better:&lt;BR /&gt;&lt;BR /&gt;I have 2 tables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Table1&lt;/STRONG&gt; is the main table containing lots of records and columns about transactions&lt;/LI&gt;&lt;/UL&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;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Table2&lt;/STRONG&gt; is used for mapping, contains more detailed information about products (pieces)&lt;/LI&gt;&lt;/UL&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;So, I would like to create a calculated column in 'Table1' to check (in this order):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;IF 'Table1'[Piece] Contains any value from 'Table2'[Piece], then return the value from 'Table2'[Piece]&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If this criteria is not met, then I would like to check the same rules from the Title:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;IF 'Table1'[Title] Contains any value from 'Table2'[Piece], then return the value from 'Table2'[Piece]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If neither one is met, I would like to return 'Table1'[Piece], even if its left blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is still the desired output:&lt;BR /&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;Then I would like to create a relationship between the created column and 'Table2'[Piece], to get more detailed information about the products.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips from anyone? If there are more information needed, please don't hesitate to ask.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 06:32:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2637901#M77378</guid>
      <dc:creator>jereaallikko</dc:creator>
      <dc:date>2022-07-14T06:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column to Check if Field CONTAINS Value From Another Table Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2637985#M77384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;LI-CODE lang="markup"&gt;Output CC =
VAR _firstcondition =
    LOOKUPVALUE ( Table2[Piece], Table2[Piece], Table1[Piece] )
VAR _secondcondition =
    SUMMARIZE (
        FILTER ( Table2, CONTAINSSTRING ( Table1[Title], Table2[Piece] ) ),
        Table2[Piece]
    )
RETURN
    IF (
        _firstcondition &amp;lt;&amp;gt; BLANK (),
        _firstcondition,
        IF ( _secondcondition &amp;lt;&amp;gt; BLANK (), _secondcondition, BLANK () )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Jul 2022 07:31:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2637985#M77384</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-07-14T07:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column to Check if Field CONTAINS Value From Another Table Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2646543#M77876</link>
      <description>&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237748" data-lia-user-login="jereaallikko" class="lia-mention lia-mention-user"&gt;jereaallikko&lt;/a&gt;,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;If these also don't help, please share more detailed information to help us clarify your scenario to test.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: tahoma; font-size: 11.0pt;"&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 05:59:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-to-Check-if-Field-CONTAINS-Value-From-Another/m-p/2646543#M77876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-19T05:59:29Z</dc:date>
    </item>
  </channel>
</rss>

