<?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 specific words on a string (in DAX) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127293#M111123</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In Power BI, I have a table with a column called Status that combines different words with 4 characters. I need to count how many times each of these 4 character words appears in the Status column. I need to do it in DAX and not in Power Query because i got the column status after other calculations in DAX. Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RERE= 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BABA= 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WEWE = 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STST= 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Empty)=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;STATUS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, WEWE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA,STST&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA,STST,WEWE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Mon, 13 Mar 2023 08:37:44 GMT</pubDate>
    <dc:creator>Luzadriana255</dc:creator>
    <dc:date>2023-03-13T08:37:44Z</dc:date>
    <item>
      <title>Counting specific words on a string (in DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127293#M111123</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In Power BI, I have a table with a column called Status that combines different words with 4 characters. I need to count how many times each of these 4 character words appears in the Status column. I need to do it in DAX and not in Power Query because i got the column status after other calculations in DAX. Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RERE= 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BABA= 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WEWE = 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STST= 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Empty)=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;STATUS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, WEWE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA,STST&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE, BABA,STST,WEWE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 13 Mar 2023 08:37:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127293#M111123</guid>
      <dc:creator>Luzadriana255</dc:creator>
      <dc:date>2023-03-13T08:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Counting specific words on a string (in DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127324#M111126</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="485918" data-lia-user-login="Luzadriana255" class="lia-mention lia-mention-user"&gt;Luzadriana255&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
    VAR __Status = MAX('Table2'[STATUS])
    VAR __Len1 = LEN(__Status)
    VAR __String = CONCATENATEX('Table',[STATUS],",")
    VAR __Len2 = LEN(__String)
    VAR __String2 = SUBSTITUTE(__String, __Status, "")
    VAR __Len3 = LEN(__String2)
    VAR __Num = DIVIDE(__Len2 - __Len3, __Len1)
    VAR __Result = IF(__Status = "", COUNTROWS(FILTER('Table',[STATUS] = "")),__Num)
RETURN
    __Result&lt;/LI-CODE&gt;
&lt;P&gt;PBIX is attached below signature.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 08:52:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127324#M111126</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-13T08:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Counting specific words on a string (in DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127567#M111147</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;thank you for your answer, unfortunately I get the same amount for all the words and that is not the right value. I was thinking to use other table where I write all the individual values. However I am not sure how to combine that. Do you have an Idea how to do it combinining the two tables? Thank you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Individual Status&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;RERE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;BABA&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;STST&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;WEWE&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 13 Mar 2023 10:07:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127567#M111147</guid>
      <dc:creator>Luzadriana255</dc:creator>
      <dc:date>2023-03-13T10:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counting specific words on a string (in DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127594#M111154</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="485918" data-lia-user-login="Luzadriana255" class="lia-mention lia-mention-user"&gt;Luzadriana255&lt;/a&gt;&amp;nbsp;Did you download and review the attached PBIX? Because it works there. I implemented the individual statuses as a disconnected table (in my PBIX Table2) Table2 status column is used in the visual along with the measure.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 10:18:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127594#M111154</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-13T10:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Counting specific words on a string (in DAX)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127670#M111157</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; I had not open that document before. Now it is clear and it works properly. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 10:44:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-specific-words-on-a-string-in-DAX/m-p/3127670#M111157</guid>
      <dc:creator>Luzadriana255</dc:creator>
      <dc:date>2023-03-13T10:44:30Z</dc:date>
    </item>
  </channel>
</rss>

