<?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 instance of string in column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2952030#M97931</link>
    <description>&lt;P&gt;I have a table (L&amp;amp;L) as below which is connected to my date table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Job role codes concatenated&lt;/P&gt;&lt;P&gt;01/11/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;03/11/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;3/10/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another table containing the codes and definitions:&lt;/P&gt;&lt;P&gt;123b4 Vet&lt;/P&gt;&lt;P&gt;34b56&amp;nbsp; nurse&lt;/P&gt;&lt;P&gt;3a421 manager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to end up with a pie chart or table showing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Job role&lt;/P&gt;&lt;P&gt;Vet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;Nurse&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Manager&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I relate these two tables and make this happen please?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2022 16:52:56 GMT</pubDate>
    <dc:creator>gingerclaire</dc:creator>
    <dc:date>2022-12-06T16:52:56Z</dc:date>
    <item>
      <title>Count instance of string in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2952030#M97931</link>
      <description>&lt;P&gt;I have a table (L&amp;amp;L) as below which is connected to my date table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Job role codes concatenated&lt;/P&gt;&lt;P&gt;01/11/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;03/11/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;3/10/22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123b4, 34b56, 2b343, 3a421&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another table containing the codes and definitions:&lt;/P&gt;&lt;P&gt;123b4 Vet&lt;/P&gt;&lt;P&gt;34b56&amp;nbsp; nurse&lt;/P&gt;&lt;P&gt;3a421 manager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to end up with a pie chart or table showing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Job role&lt;/P&gt;&lt;P&gt;Vet&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;Nurse&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;Manager&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I relate these two tables and make this happen please?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 16:52:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2952030#M97931</guid>
      <dc:creator>gingerclaire</dc:creator>
      <dc:date>2022-12-06T16:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count instance of string in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2952053#M97935</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="284783" data-lia-user-login="gingerclaire" class="lia-mention lia-mention-user"&gt;gingerclaire&lt;/a&gt;&amp;nbsp;You can either use Power Query Editor to split that column on commas and the unpivot or you could do this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
  VAR __Code = MAX('Table2'[Code])
  VAR __Table = FILTER('Table1',CONTAINSSTRING([Job role codes concatenated],__Code))
  VAR __Result = COUNTROWS(__Table)
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Dec 2022 17:05:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2952053#M97935</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-12-06T17:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count instance of string in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2954435#M98106</link>
      <description>&lt;P&gt;Thank you! I used this and it is working in a table BUT it is using COUNTROWS so is giving me the wrong totals - but i think i worked out why!&lt;BR /&gt;&lt;BR /&gt;One a single row there might be several instances of the same string i.e. each row is an event and there might be 5 or six vets at that event. So it needs to count how often the string/code appears.&lt;BR /&gt;&lt;BR /&gt;Is there a way to do this please?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 15:16:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-instance-of-string-in-column/m-p/2954435#M98106</guid>
      <dc:creator>gingerclaire</dc:creator>
      <dc:date>2022-12-07T15:16:21Z</dc:date>
    </item>
  </channel>
</rss>

