<?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 Count how many occurances of a string in a column in reference with a different column of strings in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-how-many-occurances-of-a-string-in-a-column-in-reference/m-p/827745#M5863</link>
    <description>&lt;P&gt;I have a column with folder paths, The root folders are sub divided and the divided folders are again subdivided and so on. i have some long strings in the column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now, I have to get the count of how many times a particular path has occurred in the whole column. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have the data exactly like this with couple hundered thousands of rows. The main path "c:\SHARE\Sample" must be counted&amp;nbsp;&lt;SPAN&gt;couple hundered thousand&lt;/SPAN&gt; times as it will be occurred in all of the other paths.&lt;/P&gt;&lt;P&gt;Folder 1 will be counted little less than the main path and so on for the folder 2,.. etc.&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;Any ideas are greatly appreciated. I can add the coulmn in power query or DAX. So both are an option for my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
    <pubDate>Thu, 24 Oct 2019 16:35:25 GMT</pubDate>
    <dc:creator>SriKandimalla</dc:creator>
    <dc:date>2019-10-24T16:35:25Z</dc:date>
    <item>
      <title>Count how many occurances of a string in a column in reference with a different column of strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-how-many-occurances-of-a-string-in-a-column-in-reference/m-p/827745#M5863</link>
      <description>&lt;P&gt;I have a column with folder paths, The root folders are sub divided and the divided folders are again subdivided and so on. i have some long strings in the column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now, I have to get the count of how many times a particular path has occurred in the whole column. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I have the data exactly like this with couple hundered thousands of rows. The main path "c:\SHARE\Sample" must be counted&amp;nbsp;&lt;SPAN&gt;couple hundered thousand&lt;/SPAN&gt; times as it will be occurred in all of the other paths.&lt;/P&gt;&lt;P&gt;Folder 1 will be counted little less than the main path and so on for the folder 2,.. etc.&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;Any ideas are greatly appreciated. I can add the coulmn in power query or DAX. So both are an option for my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 16:35:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-how-many-occurances-of-a-string-in-a-column-in-reference/m-p/827745#M5863</guid>
      <dc:creator>SriKandimalla</dc:creator>
      <dc:date>2019-10-24T16:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count how many occurances of a string in a column in reference with a different column of strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-how-many-occurances-of-a-string-in-a-column-in-reference/m-p/827768#M5864</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="177582" data-lia-user-login="SriKandimalla" class="lia-mention lia-mention-user"&gt;SriKandimalla&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Try this, create column using the code below.&lt;BR /&gt;Let me know if you have any questions.&lt;BR /&gt;&lt;BR /&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution, &lt;/STRONG&gt;so that others can find it easily. &lt;STRONG&gt;Kudos &lt;/STRONG&gt;are nice too.&lt;BR /&gt;Nathaniel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Column = 
var _string = Counter[Column1]

var _countS = CALCULATE(COUNTROWS(Counter),FILTER(Counter,CONTAINSSTRING(Counter[Column1],_string)))

return _countS&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 16:57:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-how-many-occurances-of-a-string-in-a-column-in-reference/m-p/827768#M5864</guid>
      <dc:creator>Nathaniel_C</dc:creator>
      <dc:date>2019-10-24T16:57:43Z</dc:date>
    </item>
  </channel>
</rss>

