<?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: Create new column to filter format license plate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054630#M14507</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223190" data-lia-user-login="DeBIe" class="lia-mention lia-mention-user"&gt;DeBIe&lt;/a&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;Assuming that the you are looking for format 1-XXX-XXX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try using ? instead of * in your search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Car Yes / No = IF(SEARCH("1-???-???",Tablename[Description],1,0),"Car", "No Car")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="notation"&gt;SEARCH ( &amp;lt;FindText&amp;gt;, &amp;lt;WithinText&amp;gt; [, &amp;lt;StartPosition&amp;gt;] [, &amp;lt;NotFoundValue&amp;gt;] )&lt;/DIV&gt;&lt;P&gt;PARAMETER ATTRIBUTES DESCRIPTION&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FindText&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The text you want to find. You can use the ? and * wildcard characters; use ~? and ~* to find the ? and * characters.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WithinText&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The text in which you want to search for FindText.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;StartPosition&lt;/TD&gt;&lt;TD&gt;Optional&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The character position in WithinText at which you want to start searching. If omitted, the default value is 1.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NotFoundValue&lt;/TD&gt;&lt;TD&gt;Optional&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The numeric value to be returned if the text is not found; if omitted, an error is returned.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&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;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Apr 2020 19:58:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-28T19:58:32Z</dc:date>
    <item>
      <title>Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1053883#M14468</link>
      <description>&lt;P&gt;Hello, fellow PBI-users :D,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to search through my "Description" fields and return True when the format is like a European license plate&lt;/P&gt;&lt;P&gt;(example: "1-AAA-000"). I am using this function at the moment:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Car Yes / No = IF(SEARCH("1-*-*",Tablename[Description],1,0),"Car", "No Car")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am getting correct results, but I am also getting a lot of other results that are correct according to the DAX formula, but somehow I would like to improve my column so that I will only get results when the format is exactly as shown above.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Example correct result:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-1-URD-666&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Example results which I do not need&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;-01-01-2020 t/m 01-09-01 .....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;- NVBTC-DSD-DD-110-DDFS-112-SS&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can anyone help me or advise on how to improve my added column? Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Apr 2020 14:36:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1053883#M14468</guid>
      <dc:creator>DeBIe</dc:creator>
      <dc:date>2020-04-28T14:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054056#M14475</link>
      <description>&lt;P&gt;You should read this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/from-sql-to-dax-string-comparison/" target="_blank"&gt;https://www.sqlbi.com/articles/from-sql-to-dax-string-comparison/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what you should really do is use Power Query to split the strings on "-" and create a suitable structure to be able to identify immediately the strings that are correct. If you do this through a table and you'll store the parts in one column, it'll be almost a child's play to create the measure you want and it'll be FAST. Trying to search for patterns through strings in DAX (using DAX functions) is not only sloooooow. It's also prone to error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 15:30:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054056#M14475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-28T15:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054231#M14487</link>
      <description>&lt;P&gt;Here's the code in Power Query that implements your logic - file attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start table - Original&lt;/P&gt;
&lt;P&gt;Getting the indexes of the correct plates - Correct Plate Index&lt;/P&gt;
&lt;P&gt;The final outcome (plate with an indicator) - Correct Plates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, you can do a bit of manipulation and merge all the code in the separate queries into one query. I left many queries for you to be able to inspect the steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 17:01:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054231#M14487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-28T17:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054630#M14507</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="223190" data-lia-user-login="DeBIe" class="lia-mention lia-mention-user"&gt;DeBIe&lt;/a&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;Assuming that the you are looking for format 1-XXX-XXX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try using ? instead of * in your search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Car Yes / No = IF(SEARCH("1-???-???",Tablename[Description],1,0),"Car", "No Car")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="notation"&gt;SEARCH ( &amp;lt;FindText&amp;gt;, &amp;lt;WithinText&amp;gt; [, &amp;lt;StartPosition&amp;gt;] [, &amp;lt;NotFoundValue&amp;gt;] )&lt;/DIV&gt;&lt;P&gt;PARAMETER ATTRIBUTES DESCRIPTION&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FindText&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The text you want to find. You can use the ? and * wildcard characters; use ~? and ~* to find the ? and * characters.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WithinText&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The text in which you want to search for FindText.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;StartPosition&lt;/TD&gt;&lt;TD&gt;Optional&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The character position in WithinText at which you want to start searching. If omitted, the default value is 1.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NotFoundValue&lt;/TD&gt;&lt;TD&gt;Optional&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;The numeric value to be returned if the text is not found; if omitted, an error is returned.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&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;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 19:58:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054630#M14507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-28T19:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054642#M14510</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;The formula Car Yes / No = IF(SEARCH("1-???-???",Tablename[Description],1,0),"Car", "No Car") is not fully correct in this case. The second piece ??? must consist of letters and the last ??? piece must consist of digits. As much as I can tell. And this would be achievable in DAX but it's not worth it. Power Query does it effectively and in a simple way.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 20:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054642#M14510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-28T20:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054659#M14512</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree that it can be done in an effective way in PowerQuery. No questions regarding this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But not sure what you mean by the second part of your statement.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;? represents a character and can be a digit or a alphabet.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have shown the search using ? in the image attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 20:24:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1054659#M14512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-28T20:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1055937#M14555</link>
      <description>From the original post:&lt;BR /&gt;&lt;BR /&gt;(example: "1-AAA-000")&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 29 Apr 2020 09:27:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1055937#M14555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T09:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1055975#M14558</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I get what you want to convey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 09:37:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1055975#M14558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T09:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create new column to filter format license plate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1056732#M14590</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your time and help so far. For now I will replace the &lt;STRONG&gt;(*)&amp;nbsp;&lt;/STRONG&gt;for &lt;STRONG&gt;(?)&lt;/STRONG&gt;, because I need to implement this asap and show results. I do understand that there is a more solid solution, as you've shown me&amp;nbsp;Anonymous&lt;/a&gt;. I will sure inspect the steps that you've taken and read the article so I will understand why it is better to implement it that way.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 14:18:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-new-column-to-filter-format-license-plate/m-p/1056732#M14590</guid>
      <dc:creator>DeBIe</dc:creator>
      <dc:date>2020-04-29T14:18:26Z</dc:date>
    </item>
  </channel>
</rss>

