<?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: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%' in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2634470#M77201</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up finding solution by creating a separate Char table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 18:20:51 GMT</pubDate>
    <dc:creator>JustinDoh1</dc:creator>
    <dc:date>2022-07-12T18:20:51Z</dc:date>
    <item>
      <title>How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2628476#M76782</link>
      <description>&lt;P&gt;I am trying to express bottom SQL statement in DAX:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;CONTAINSSTRING&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[ACCOUNTNO]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"ABCDEFGHIJKLMNOPQRSTUVWXYZ"&lt;/SPAN&gt;&lt;SPAN&gt; ))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but, it would not work.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This was based on &lt;A href="https://stackoverflow.com/questions/70955061/is-there-any-function-in-dax-to-find-string-like-in-sql-like-string" target="_self"&gt;this link in Stackoverflow&lt;/A&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I initially searched online, I got &lt;A href="https://www.sqlbi.com/blog/marco/2011/12/30/string-comparison-in-dax/" target="_self"&gt;this link&lt;/A&gt;&amp;nbsp;(Russo's) , but I am not sure how I should approach.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Jul 2022 21:01:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2628476#M76782</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2022-07-08T21:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2628680#M76805</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296339" data-lia-user-login="JustinDoh1" class="lia-mention lia-mention-user"&gt;JustinDoh1&lt;/a&gt; , This seem file, where are using this like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if (not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )) , "A", "B")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate(sum(Table[Value]), filter(Table, not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )) )&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 07:36:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2628680#M76805</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-09T07:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629072#M76825</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;Does bottom DAX expression look ok?&lt;/P&gt;&lt;P&gt;Somehow, I am getting the same amount as the amount I validate result from SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculate(&lt;BR /&gt;sum (Table[AMOUNT]),&lt;BR /&gt;filter(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Table,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Table[CLASSID] = "100" &amp;amp;&amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (left('Table'[ACCOUNTNO],1) IN {"4", "5"}) &amp;amp;&amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2022 05:15:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629072#M76825</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2022-07-10T05:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629335#M76857</link>
      <description>&lt;P&gt;Table.[ACCOUNTNO] not like '%&lt;STRONG&gt;[A-Z]&lt;/STRONG&gt;%' is enough,&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;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For fun only, a showcase of powerful Excel worksheet formula,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2022 20:38:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629335#M76857</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-07-10T20:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629355#M76860</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;I was looking at the Pbix file, but I guess I am trying to figure out DAX from where I have left off (expression like:&amp;nbsp;&lt;SPAN&gt;not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ"&amp;nbsp;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far.&lt;/P&gt;&lt;P&gt;Calculate&lt;BR /&gt;(&lt;BR /&gt;sum (Table[AMOUNT]),&lt;BR /&gt;filter (Table, Table[CLASSID] = "100"),&lt;BR /&gt;filter (Table, left('Table'[ACCOUNTNO],1) IN {"4", "5"} ) ,&lt;BR /&gt;filter (Table, not ( CONTAINSSTRING( 'Table'[ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still not getting the expected value (matching with my SQL's output from SQL query below):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select&lt;BR /&gt;sum ( [AMOUNT] )&lt;BR /&gt;from [dbo].[Table]&lt;BR /&gt;where [CLASSID] in ('100')&lt;BR /&gt;and left([ACCOUNTNO],1) in ('4', '5')&lt;BR /&gt;and [ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2022 21:50:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2629355#M76860</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2022-07-10T21:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2632046#M77029</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached &lt;A href="https://drive.google.com/file/d/1CpHpxjZomsnazzjkYAMo_FL7Nah3p3Uo/view?usp=sharing" target="_self"&gt;PBIX file here&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;So, I am not sure why it would not calculate this part correctly:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;CONTAINSSTRING( [ACCOUNTNO], "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) &lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this DAX formula works, it should generate total of 8074.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;$133.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$12.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$432.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$589.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$848.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$374.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$168.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$846.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$841.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$773.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$899.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$1,086.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$736.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$337.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Currently, it shows 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if this is something to do with data type.&lt;/P&gt;&lt;P&gt;Currently, in PBI file, ACCOUNTNO is in "text" data type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 20:39:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2632046#M77029</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2022-07-11T20:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to express this SQL expression: Table.[ACCOUNTNO] not like '%[ABCDEFGHIJKLMNOPQRSTUVWXYZ]%'</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2634470#M77201</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up finding solution by creating a separate Char table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 18:20:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-express-this-SQL-expression-Table-ACCOUNTNO-not-like/m-p/2634470#M77201</guid>
      <dc:creator>JustinDoh1</dc:creator>
      <dc:date>2022-07-12T18:20:51Z</dc:date>
    </item>
  </channel>
</rss>

