<?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 Counting comma delimited text strings in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245386#M119533</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field in my data model that&amp;nbsp;represents a reason for something occuring. The field is&amp;nbsp;is made up of between zero and up to nine strings of numbers, the field is formatted as text. The string corresponds to a text field in a look up table.&amp;nbsp;In the data model there are nine 'reasons'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each string is nine digits long (using the digits 0-9), and within each cell there can be multiple reasons for the occurance, each separated with a comma. I think at most all nine of the reasons might be present in a single cell, but the same reason will not be there more than once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to count the number of each of the 9 reasons across the rows, and present that in the visualisations as a table using the actual text 'reason' from the look up table. It obviously needs to be filterable by various other fields in that table - date, and a few categories. I've set up the relationship betweeen the two enities and feel fairly confident in that part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea about how to do this, I'm reluctant to split the reasons into differernt columms as that seems messy, but if that's the best way. Do I need a measure for each of the nine reasons, that also seems messy - and a bit time consuming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either a DAX code or suggestion in Power Query. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
    <pubDate>Sat, 20 May 2023 18:55:48 GMT</pubDate>
    <dc:creator>BINewbie1</dc:creator>
    <dc:date>2023-05-20T18:55:48Z</dc:date>
    <item>
      <title>Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245386#M119533</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field in my data model that&amp;nbsp;represents a reason for something occuring. The field is&amp;nbsp;is made up of between zero and up to nine strings of numbers, the field is formatted as text. The string corresponds to a text field in a look up table.&amp;nbsp;In the data model there are nine 'reasons'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each string is nine digits long (using the digits 0-9), and within each cell there can be multiple reasons for the occurance, each separated with a comma. I think at most all nine of the reasons might be present in a single cell, but the same reason will not be there more than once.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to count the number of each of the 9 reasons across the rows, and present that in the visualisations as a table using the actual text 'reason' from the look up table. It obviously needs to be filterable by various other fields in that table - date, and a few categories. I've set up the relationship betweeen the two enities and feel fairly confident in that part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea about how to do this, I'm reluctant to split the reasons into differernt columms as that seems messy, but if that's the best way. Do I need a measure for each of the nine reasons, that also seems messy - and a bit time consuming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either a DAX code or suggestion in Power Query. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 18:55:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245386#M119533</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T18:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245389#M119534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes possible with DAX. please present one example.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 15:26:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245389#M119534</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T15:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245406#M119536</link>
      <description>&lt;P&gt;Hi tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in this field say there are 5 rows, which look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;441690000,&amp;nbsp;&lt;SPAN&gt;441690001,&amp;nbsp;441690004,&amp;nbsp;441690006&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;441690001,&amp;nbsp;441690003, 441690004, 441690006&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690002,&amp;nbsp;441690005&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690003,&amp;nbsp;441690005,&amp;nbsp;441690006,&amp;nbsp;441690008,&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;441690009&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690002,&amp;nbsp;441690003,&amp;nbsp;441690005,&amp;nbsp;441690007,&amp;nbsp;441690008,&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;441690009&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I'd like to end up with a visualisation showing:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;441690000 = 1&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;441690001 = 2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690002 = 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690003 = 3&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690004 = 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690005 = 3&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690006 = 3&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690007 = 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;441690008 = 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;441690009 = 2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Watching a youtube video I've come up with the following Measure, which seems to do something but maybe is under reporting, and seems to have a large number of null/blank fields, which maybe the data, or maybe the Measure.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Count Referal Text = &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATETABLE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;pre_referral&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;pre_referral&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;IFERROR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SEARCH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Lookup BBBC_referalreasonquestions_health'&lt;/SPAN&gt;&lt;SPAN&gt;[Code]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;pre_referral&lt;/SPAN&gt;&lt;SPAN&gt;[bbbc_referralreasonquestions_health]&lt;/SPAN&gt;&lt;SPAN&gt;),-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Adam&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 16:15:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245406#M119536</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T16:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245413#M119537</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming &lt;SPAN&gt;pre_referral[bbbc_referralreasonquestions_health] is the column that contains the comma delimit strings and&amp;nbsp;'Lookup&amp;nbsp;BBBC_referalreasonquestions_health'[Code] is column from the disconnected table tyat contains the distinct unique values of the strings (also text data type not integer) which is the column placed in the table visual, then please try&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count Referal Text =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;CROSSJOIN (&lt;BR /&gt;VALUES ( pre_referral[bbbc_referralreasonquestions_health] ),&lt;BR /&gt;VALUES ( 'Lookup BBBC_referalreasonquestions_health'[Code] )&lt;BR /&gt;),&lt;BR /&gt;CONTAINSSTRING (&lt;BR /&gt;pre_referral[bbbc_referralreasonquestions_health],&lt;BR /&gt;'Lookup BBBC_referalreasonquestions_health'[Code]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 16:40:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245413#M119537</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T16:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245418#M119538</link>
      <description>&lt;P&gt;Yes so on a bit of a review of the data, the measure is not working as desired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its only counting the strings when they are in a cell on their own, not when they are part of a cluster of other strings in the same cell. Hence the numbers significantly under reporting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should add at this point that the strings, are seperated only by a comma, not by a space as well, as in my example before:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;441690003,441690008&lt;BR /&gt;441690003,441690004,441690005,441690007,441690008&lt;BR /&gt;441690003&lt;BR /&gt;441690003&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current measure would show:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;441690003 = 2 - for some reason only when the text string is on its own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it should count:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;441690003 = 4&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 18:57:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245418#M119538</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T18:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245424#M119539</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Strange. My proposed measure should give a result of 4. There must be another issue perhaps extra space. Also double check the order of columns inside CONTAINSSTING&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 17:00:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245424#M119539</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T17:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245425#M119540</link>
      <description>&lt;P&gt;Thanks for offering this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't work i'm afraid, just a 1 value for each reason, and 144 for 151 blanks (no idea where that's coming from). Maybe its counting distictvalues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The string value in the lookup table was actually set to an integer, but I changed it to text, but seems to make no difference to either measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 17:05:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245425#M119540</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T17:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245437#M119542</link>
      <description>&lt;P&gt;I'm not great with coding generally, took be ages to work out I needed an extra comma to make one be of code work the other day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having looked up the syntax for CONTAINSTRING, its round the correct way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll carry on trying to find a space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 17:20:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245437#M119542</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T17:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245454#M119543</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check for spaces or hidden characters in the lookup table. You can use power query to trim and clean. Also mske sure the data type of bith columns is text.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 17:50:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245454#M119543</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T17:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245478#M119544</link>
      <description>&lt;P&gt;Thanks, its clean, and data type is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering about the text appearing as a single long string. In the Measure I posted that seems to be how its behaving. Only counting the string when it appears on its own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there maybe a wildcard character I could insert into the Dax to effectivly break up the long comma seperated fields. ? or *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 18:45:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245478#M119544</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T18:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245512#M119546</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please confirm which column that contains the comma delimited texts and which one is the unique distinct text values?&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 19:17:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245512#M119546</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T19:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245537#M119554</link>
      <description>&lt;P&gt;Thanks for sticking with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pre_referral&lt;/SPAN&gt;&lt;SPAN&gt;[bbbc_referralreasonquestions_health] is the long list of comma deliminated strings, within the&amp;nbsp;fact table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lookup BBBC_referalreasonquestions_health[Code], is the dimention table that contains the list of 10 codes alongside the corresponding name for the reason in plan english, which is called [Display].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was a bit confused by which fields need to have the ' in the Dax.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 19:48:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245537#M119554</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T19:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245547#M119555</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;can you help me out with some screenshots?&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 20:01:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245547#M119555</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-20T20:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245557#M119556</link>
      <description>&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screen shot one is using the Measure Count Referal Text 2 using your Dax code, and the table displaying the data.&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;and screen shot two is using the Measure Count Referal Text, which uses the Dax code I borrowed from youtube, which is a bit closer, but its only counting the strings when they appear on their own in a cell, not when in a long list of other strings.&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;Hope that's viewable - if not i'll enlarge them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Adam&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 20:24:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245557#M119556</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T20:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245559#M119557</link>
      <description>&lt;P&gt;Sorry here's a third screen shot with the fields atually as you wrote the code. I swapped them around just to check. But it made no difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2023 20:29:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245559#M119557</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-20T20:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245780#M119579</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Looking at this screenshot I instantly realized my mistake. We need to filter the complete table as the VALUES of the column will return only distinct values and duplicates won't be counted.&lt;/P&gt;
&lt;P&gt;However, in the example that you have provided earlier, the first code would have produced 3 not 2. I will create a sample file to double check. For now please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count Referal Text =
COUNTROWS (
    FILTER (
        CROSSJOIN (
            pre_referral,
            VALUES ( 'Lookup BBBC_referalreasonquestions_health'[Code] )
        ),
        CONTAINSSTRING (
            pre_referral[bbbc_referralreasonquestions_health],
            'Lookup BBBC_referalreasonquestions_health'[Code]
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;*UPDATE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Attached is the sample file&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Also make sure there is no relationship between the two tables. Some times it is automatically created without you even noticing.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 07:01:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245780#M119579</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-21T07:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Counting comma delimited text strings</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245834#M119582</link>
      <description>&lt;P&gt;Thanks Tamerj1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That seems to be working fine now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's was a relationship between the tables and turning it off seems to have done the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also now know that there's isn't a 10th code for other - suspect the free text for other is kept somewhere else in the system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for all you work - its really appreciated!,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 08:09:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-comma-delimited-text-strings/m-p/3245834#M119582</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2023-05-21T08:09:56Z</dc:date>
    </item>
  </channel>
</rss>

