<?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: Does anyone know a good way to analyze model code options from a model string? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056398#M105448</link>
    <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use CONTAINSSTRING instead of FIND, as defining the start position is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dax.guide/containsstring/" target="_blank"&gt;https://dax.guide/containsstring/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 00:08:42 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-02-02T00:08:42Z</dc:date>
    <item>
      <title>Does anyone know a good way to analyze model code options from a model string?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056303#M105440</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know a good way to analyze model code options from strings?&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;I have a list model codes and I'm trying to find out what options are being ordered &amp;amp; analyze the data. I decided to find the code and create a column that says it exists (1) or doesn't exist (0) on&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;that line.&lt;/P&gt;&lt;P class=""&gt;An example of how I'm approaching this in DAX is below:&lt;/P&gt;&lt;P class=""&gt;Option H5 =&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SWITCH( 'Table'[Model String], "5000X",&lt;BR /&gt;IF(FIND("H5", 'Table'[Model String], 5, 0) = 0 , 0, 1) )&lt;/P&gt;&lt;P class=""&gt;So this starts searching at character 5 and returns either a 1 or a 0 if the code is found.&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Does anyone know a better way to do this?&lt;/P&gt;&lt;P class=""&gt;In the random case below we'll say that the type of product is a 5000X and everything after that is an "option" in the model string. These could be in any combination but I would assume they are unique codes. These options could be used across different types of products (e.g. 6000X, 7000X, etc...).&lt;/P&gt;&lt;P class=""&gt;There are some cases where the product type has a different number of characters (e.g. 5000X, 5000XX) so if you know an even better way to include that in analyzing this data I would love to hear it.&lt;/P&gt;&lt;P class=""&gt;I have other columns that have the product types listed (5000x, 6000X, 5000XX, etc...).&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Feb 2023 22:23:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056303#M105440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-01T22:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know a good way to analyze model code options from a model string?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056398#M105448</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use CONTAINSSTRING instead of FIND, as defining the start position is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dax.guide/containsstring/" target="_blank"&gt;https://dax.guide/containsstring/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 00:08:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056398#M105448</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-02T00:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know a good way to analyze model code options from a model string?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056552#M105453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try to create column with below dax formula:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;H5 = IF(CONTAINSSTRING([Model String],"H5"),1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;M6 = IF(CONTAINSSTRING([Model String],"M6"),1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;R7 = IF(CONTAINSSTRING([Model String],"R7"),1,0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Z2 = IF(CONTAINSSTRING([Model String],"Z2"),1,0)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_Binbin Yu&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 02:00:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Does-anyone-know-a-good-way-to-analyze-model-code-options-from-a/m-p/3056552#M105453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-02T02:00:09Z</dc:date>
    </item>
  </channel>
</rss>

