<?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: Contains in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073534#M106776</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512694" data-lia-user-login="Jedahn" class="lia-mention lia-mention-user"&gt;Jedahn&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can use below DAX expression to create a column in a table:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Column = If(CONTAINSSTRING('Sample'[Column A], "Apples") || CONTAINSSTRING('Sample'[Column A], "Orange") , "Fruits",&lt;/P&gt;&lt;P&gt;IF(CONTAINSSTRING('Sample'[Column A], "Spinach") || CONTAINSSTRING('Sample'[Column A], "Potato") ,"Vegetables","Herbs"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to the below screenshot,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;Inogic Professional Service Division&lt;/P&gt;&lt;P&gt;An expert technical extension for your techno-functional business needs&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM&lt;/P&gt;&lt;P&gt;Drop an email at &lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Service:&amp;nbsp; &lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 03:58:16 GMT</pubDate>
    <dc:creator>SamInogic</dc:creator>
    <dc:date>2023-02-10T03:58:16Z</dc:date>
    <item>
      <title>Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073502#M106772</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What DAX formula i can use the same with the one I'm using in Tableau calculations. Please see example for my tableau calculation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF CONTAINS([ColumnsA], "Apples")&lt;/P&gt;&lt;P&gt;OR CONTAINS([Column A], "Orange")&lt;/P&gt;&lt;P&gt;THEN "Fruits"&lt;/P&gt;&lt;P&gt;ELSEIF&lt;/P&gt;&lt;P&gt;IF CONTAINS([ColumnsA], "Spinach")&lt;/P&gt;&lt;P&gt;OR CONTAINS([Column A], "Potato")&lt;/P&gt;&lt;P&gt;THEN "Vegetables"&lt;/P&gt;&lt;P&gt;ELSE "Herbs" END&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Your help would be appreciated. Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 03:18:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073502#M106772</guid>
      <dc:creator>Jedahn</dc:creator>
      <dc:date>2023-02-10T03:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073534#M106776</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512694" data-lia-user-login="Jedahn" class="lia-mention lia-mention-user"&gt;Jedahn&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can use below DAX expression to create a column in a table:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Column = If(CONTAINSSTRING('Sample'[Column A], "Apples") || CONTAINSSTRING('Sample'[Column A], "Orange") , "Fruits",&lt;/P&gt;&lt;P&gt;IF(CONTAINSSTRING('Sample'[Column A], "Spinach") || CONTAINSSTRING('Sample'[Column A], "Potato") ,"Vegetables","Herbs"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to the below screenshot,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;&lt;P&gt;Inogic Professional Service Division&lt;/P&gt;&lt;P&gt;An expert technical extension for your techno-functional business needs&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM&lt;/P&gt;&lt;P&gt;Drop an email at &lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Service:&amp;nbsp; &lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 03:58:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073534#M106776</guid>
      <dc:creator>SamInogic</dc:creator>
      <dc:date>2023-02-10T03:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073539#M106777</link>
      <description>&lt;P&gt;NewColumn=SWITCH(TRUE(),Table[ColumnA] IN {"Apples","Orange"},"Fruits",Table[ColumnA] IN {"&lt;SPAN&gt;Spinach&lt;/SPAN&gt;","&lt;SPAN&gt;Potato&lt;/SPAN&gt;"},"Fruits","Herbs")&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 04:10:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073539#M106777</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-02-10T04:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073892#M106797</link>
      <description>&lt;P&gt;Thank you for the reply. What does the 'Sample' in formula means? Is it the Table name or column name?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 07:54:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3073892#M106797</guid>
      <dc:creator>Jedahn</dc:creator>
      <dc:date>2023-02-10T07:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3074362#M106828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="512694" data-lia-user-login="Jedahn" class="lia-mention lia-mention-user"&gt;Jedahn&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Yes, "Sample" is a Table name in the Power BI report. Please find reference screenshot of the Power Query for Table :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Inogic Professional Service Division&lt;/P&gt;&lt;P&gt;An expert technical extension for your techno-functional business needs&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM&lt;/P&gt;&lt;P&gt;Drop an email at &lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Service:&amp;nbsp; &lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 10:54:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Contains/m-p/3074362#M106828</guid>
      <dc:creator>SamInogic</dc:creator>
      <dc:date>2023-02-10T10:54:09Z</dc:date>
    </item>
  </channel>
</rss>

