<?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: Return True or False if one row from column B contains a certain string for all values of column A in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3227658#M118265</link>
    <description>&lt;P&gt;Doesn't look like all distinct values of Column A received a TRUE from my end when they should have.&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 18:23:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-09T18:23:23Z</dc:date>
    <item>
      <title>Return True or False if one row from column B contains a certain string for all values of column A</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3226104#M118149</link>
      <description>&lt;P&gt;In this example I am trying to return true or false in column C based on whether one of the rows in column B contains the string "white" within a larger string&amp;nbsp;for all distinct values within column A.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;red&lt;/STRONG&gt;&lt;U&gt;&lt;STRONG&gt;white&lt;/STRONG&gt;&lt;/U&gt;&lt;STRONG&gt;green&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;yellowpurple&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;redblue&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;blueblack&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;greenblue&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;redblack&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;&lt;U&gt;&lt;STRONG&gt;white&lt;/STRONG&gt;&lt;/U&gt;&lt;STRONG&gt;silver&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 09 May 2023 04:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3226104#M118149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T04:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Return True or False if one row from column B contains a certain string for all values of column A</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3226146#M118154</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;How about this:&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;Here the code for the measure:&lt;/P&gt;
&lt;PRE&gt;Measure = 
IF (
    CALCULATE ( 
        CONTAINSSTRING ( 
            MAX ( 'Table'[B] ), "white" ), ALLEXCEPT ('Table', 'Table'[A] )
    ),
    true,
    false
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know, if this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 05:14:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3226146#M118154</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2023-05-09T05:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return True or False if one row from column B contains a certain string for all values of column A</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3227658#M118265</link>
      <description>&lt;P&gt;Doesn't look like all distinct values of Column A received a TRUE from my end when they should have.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 18:23:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3227658#M118265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T18:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Return True or False if one row from column B contains a certain string for all values of column A</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3228032#M118296</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please could you share the data and the screenshot showing which ones do not receive a true though they should have?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 02:21:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3228032#M118296</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2023-05-10T02:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Return True or False if one row from column B contains a certain string for all values of column A</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3257564#M120344</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;Please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _a = COUNTROWS(FILTER(ALL('Table'),[A ]=SELECTEDVALUE('Table'[A ])&amp;amp;&amp;amp;CONTAINSSTRING([B],"white")))
return _a&amp;gt;0&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&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;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 07:27:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-True-or-False-if-one-row-from-column-B-contains-a-certain/m-p/3257564#M120344</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2023-05-29T07:27:15Z</dc:date>
    </item>
  </channel>
</rss>

