<?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: Calculate values based on contained strings in the data from column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1208710#M19428</link>
    <description>&lt;P&gt;Create a calculated column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestColumn&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColA&amp;nbsp;=&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"LPercent"&lt;/SPAN&gt;,&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColB&amp;nbsp;*&amp;nbsp;&lt;SPAN class="Number"&gt;100&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;'%',&amp;nbsp;&lt;SPAN class="Keyword"&gt;BLANK&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 09:24:44 GMT</pubDate>
    <dc:creator>deepak91g</dc:creator>
    <dc:date>2020-07-08T09:24:44Z</dc:date>
    <item>
      <title>Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1208011#M19418</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please anyone advise how to calculate a value based on contained strings in the data from another column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P&gt;Table1 has colA as text and colB as numeric; There are some data that should be calculated as percentage, so I want to * 100 if colA contains "LPercent" string value. Also, I want to add the symbol&amp;nbsp; "%"&amp;nbsp; after multiplying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;KL&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 04:10:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1208011#M19418</guid>
      <dc:creator>kitti</dc:creator>
      <dc:date>2020-07-08T04:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1208710#M19428</link>
      <description>&lt;P&gt;Create a calculated column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestColumn&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColA&amp;nbsp;=&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"LPercent"&lt;/SPAN&gt;,&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColB&amp;nbsp;*&amp;nbsp;&lt;SPAN class="Number"&gt;100&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;'%',&amp;nbsp;&lt;SPAN class="Keyword"&gt;BLANK&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 09:24:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1208710#M19428</guid>
      <dc:creator>deepak91g</dc:creator>
      <dc:date>2020-07-08T09:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211173#M19497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I change "=" to something like CONTAINS function? And I want to leave the original ColB data instead of BLANK (). I already tried it but got an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestColumn&amp;nbsp;=&lt;BR /&gt;&lt;SPAN class="Keyword"&gt;IF&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColA&amp;nbsp;=&amp;nbsp;&lt;SPAN class="StringLiteral"&gt;"LPercent"&lt;/SPAN&gt;,&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;ColB&amp;nbsp;*&amp;nbsp;&lt;SPAN class="Number"&gt;100&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;amp;&amp;nbsp;'%',&amp;nbsp;&lt;SPAN class="Keyword"&gt;BLANK&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Parenthesis"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Parenthesis"&gt;KL&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 08:15:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211173#M19497</guid>
      <dc:creator>kitti</dc:creator>
      <dc:date>2020-07-09T08:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211254#M19498</link>
      <description>&lt;P&gt;You can try creating a custom column in Power Query instead of creating a DAX measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/text-contains" target="_blank"&gt;https://docs.microsoft.com/en-us/powerquery-m/text-contains&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can use ColB instead of Blank() but need ensure same data type for all values&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 08:45:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211254#M19498</guid>
      <dc:creator>deepak91g</dc:creator>
      <dc:date>2020-07-09T08:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211266#M19499</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193067" data-lia-user-login="kitti" class="lia-mention lia-mention-user"&gt;kitti&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try this Calcuated Column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column =
IF (
    CONTAINSSTRING (
        Table['ColA'],
        "LPercent"
    ),
    ( 'Table'[ColB] * 100 ) &amp;amp; '%',
    'Table'[ColB]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 08:49:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1211266#M19499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-09T08:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1217585#M19684</link>
      <description>&lt;P&gt;I have just tried but got an error, please help&lt;/P&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;KL&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 07:26:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1217585#M19684</guid>
      <dc:creator>kitti</dc:creator>
      <dc:date>2020-07-13T07:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1217820#M19688</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193067" data-lia-user-login="kitti" class="lia-mention lia-mention-user"&gt;kitti&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;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column =
IF (
    CONTAINSSTRING (
        Sheet1[PCQ Item],
        "LPercent"
    ),
    ( Sheet1[Result- QTD] * 100 ) &amp;amp; "%",
    CONVERT (
        Sheet1[Result- QTD],
        STRING
    )
)&lt;/LI-CODE&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;Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 08:36:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1217820#M19688</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-13T08:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate values based on contained strings in the data from column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1220634#M19801</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 a bunch. It works perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;KL&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 08:17:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-values-based-on-contained-strings-in-the-data-from/m-p/1220634#M19801</guid>
      <dc:creator>kitti</dc:creator>
      <dc:date>2020-07-14T08:17:15Z</dc:date>
    </item>
  </channel>
</rss>

