<?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 Searching for text containing key words in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545215#M30504</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working in Power BI service using DirectQuery mode.&lt;/P&gt;&lt;P&gt;I want to search for keywords in a free text feld and then say true of false if the keyword can be found or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally this would be a measure, I used a conditional column with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= Table.AddColumn(#"Added Conditional Column", "SearchText", each if Text.Contains([eps_description], "FW") then "Firmware" else if Text.Contains([eps_description], "Firmware") then "Firmware" else if Text.Contains([eps_description], "Panel") then "Panel" else if Text.Contains([eps_description], "Settings") then "Settings" else false)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get an error "This step results in a query that is not supported in DirectQuey mode Switch all tables to import mode"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can the above be done as a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks for your help,&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 10:40:04 GMT</pubDate>
    <dc:creator>drwinny</dc:creator>
    <dc:date>2020-12-11T10:40:04Z</dc:date>
    <item>
      <title>Searching for text containing key words</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545215#M30504</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working in Power BI service using DirectQuery mode.&lt;/P&gt;&lt;P&gt;I want to search for keywords in a free text feld and then say true of false if the keyword can be found or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally this would be a measure, I used a conditional column with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= Table.AddColumn(#"Added Conditional Column", "SearchText", each if Text.Contains([eps_description], "FW") then "Firmware" else if Text.Contains([eps_description], "Firmware") then "Firmware" else if Text.Contains([eps_description], "Panel") then "Panel" else if Text.Contains([eps_description], "Settings") then "Settings" else false)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get an error "This step results in a query that is not supported in DirectQuey mode Switch all tables to import mode"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can the above be done as a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks for your help,&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 10:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545215#M30504</guid>
      <dc:creator>drwinny</dc:creator>
      <dc:date>2020-12-11T10:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Searching for text containing key words</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545605#M30512</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193114" data-lia-user-login="drwinny" class="lia-mention lia-mention-user"&gt;drwinny&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to implement the column logic in the source table. Or, try to create a calculated column using DAX.&lt;/P&gt;
&lt;P&gt;example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Status = 
var _x=database_file[root_path]
var _result= CONTAINSSTRING(_x,"MSSQL")
return _result&lt;/LI-CODE&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;</description>
      <pubDate>Fri, 11 Dec 2020 13:36:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545605#M30512</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-12-11T13:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Searching for text containing key words</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545641#M30513</link>
      <description>&lt;P&gt;Sorry i am new to DAX and don't really understand the example, I will ask for it to be added to the database view that I am using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for trying to help me.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 13:43:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Searching-for-text-containing-key-words/m-p/1545641#M30513</guid>
      <dc:creator>drwinny</dc:creator>
      <dc:date>2020-12-11T13:43:22Z</dc:date>
    </item>
  </channel>
</rss>

