<?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: Extract text between every occurrence of delimeters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266473#M169110</link>
    <description>&lt;P&gt;So in my prior reply, I pasted code for Example execution...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You can copy that code, as it is, into a new blank query. Same as you did with the function.&lt;/P&gt;
&lt;P&gt;This query is just an example of the function envoked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The AddCustom and ExpandedCustom steps are what you want to add to your table.&lt;/P&gt;
&lt;P&gt;I included that so you could see how it functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you add these steps, you will need to change 'Source' to whatever the previous step in your table is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2024 05:59:23 GMT</pubDate>
    <dc:creator>KNP</dc:creator>
    <dc:date>2024-11-01T05:59:23Z</dc:date>
    <item>
      <title>Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266213#M169091</link>
      <description>&lt;P&gt;I have a Location column with suburb and state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Sydney - NSW, Melbourne - VIC, Canberra - ACT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how would I create a new column, either calculated or in power query that extracts all the states with comma as separator?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired output, ideally alphabetically ordered:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ACT, NSW, VIC&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 01:01:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266213#M169091</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-01T01:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266261#M169096</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is standard operation for Power Query, just give it a try and you will like it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;About how:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/split-columns-delimiter" target="_blank"&gt;https://learn.microsoft.com/en-us/power-query/split-columns-delimiter&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 01:47:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266261#M169096</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-11-01T01:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266340#M169100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not quite out of the box functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This function (Paste into a blank query in the advanced editor) call it &lt;STRONG&gt;fSplitCombineOrder&lt;/STRONG&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    SplitAndSortStates = (inputTable as table, columnName as text) as table =&amp;gt;
    let
        SplitColumn = 
        Table.ExpandListColumn(
            Table.TransformColumns(
                inputTable, 
                {{columnName, Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv), type text}}
            ), 
            columnName
        ),
        ExtractState = 
        Table.TransformColumns(
            SplitColumn, 
            {{columnName, each Text.AfterDelimiter(_, " - "), type text}}
        ),
        RemoveDuplicates = 
        Table.Distinct(
            ExtractState
        ),
        SortStates = 
        Table.Sort(
            RemoveDuplicates,
            {{columnName, Order.Ascending}}
        ),
        CombineStates = 
        Table.AddColumn(
            SortStates, 
            "Combined", 
            each Text.Combine(List.Sort(List.Distinct(Table.Column(SortStates, columnName))), ", "), 
            type text
        ),
        Result = 
        Table.Distinct(
            Table.SelectColumns(CombineStates, {"Combined"})
        )
    in
        Result
in
    SplitAndSortStates&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example execution:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = 
    Table.FromRows(
        Json.Document(
            Binary.Decompress(
                Binary.FromText(
                    "i45WCq5MyUutVNBV8AsO11HwTc1Jyi8tyksFCoR5OusoOCfmJaUWFSUC+Y7OIUqxOsNERywA", 
                    BinaryEncoding.Base64
                ), 
                Compression.Deflate
            )
        ), 
        let
            _t = 
            ((type nullable text) meta [Serialized.Text = true])
        in
            type table [Column1 = _t]
    ),
    AddedCustom = 
    Table.AddColumn(
        Source, 
        "fSplitCombineOrder", 
        each fSplitCombineOrder(Source, "Column1")
    ),
    ExpandedCustom = 
    Table.ExpandTableColumn(
        AddedCustom, 
        "fSplitCombineOrder", 
        {"Combined"}, 
        {"Combined"}
    )
in
    ExpandedCustom&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 02:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266340#M169100</guid>
      <dc:creator>KNP</dc:creator>
      <dc:date>2024-11-01T02:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266347#M169101</link>
      <description>&lt;P&gt;Hi Freeman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm aware of this feature but I end up with a merged column with multiple commas repeated and some states are duplicated in other rows.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I would ideally prefer a simple DAX or M query&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 02:57:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266347#M169101</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-01T02:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266372#M169103</link>
      <description>&lt;P&gt;Thanks heaps&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="129725" data-lia-user-login="KNP" class="lia-mention lia-mention-user"&gt;KNP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've never had to do this before.&lt;/P&gt;&lt;P&gt;Where do I input the execution please?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 03:12:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266372#M169103</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-01T03:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266389#M169104</link>
      <description>&lt;P&gt;In Power Query, right click in the queries pane in a blank space and choose blank query.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Right click on your new query and select Advanced editor...&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace the code with the function code I've provided and click done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rename the query... (you can call it whatever you like but that's how you'll reference it)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your table, you'll create a step like...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(
        Source, 
        "fSplitCombineOrder", 
        each fSplitCombineOrder(Source, "Column1")
    )&lt;/LI-CODE&gt;
&lt;P&gt;Change 'Source' and '"Column1"' to whatever your previous step and column is called. You need the "" around the column name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final step is to expand the column to get the output...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.ExpandTableColumn(
        AddedCustom, 
        "fSplitCombineOrder", 
        {"Combined"}, 
        {"Combined"}
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that helps but feel free to ask any questions on the specific steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 03:21:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266389#M169104</guid>
      <dc:creator>KNP</dc:creator>
      <dc:date>2024-11-01T03:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266419#M169106</link>
      <description>&lt;P&gt;It certainly helps and I appreciate your assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an invoked function and a query, but your screenshot only shows the query? Which am I using?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please also expand on&amp;nbsp;&lt;SPAN&gt;Change 'Source' and '"Column1"' to whatever your previous step and column is called?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 04:12:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266419#M169106</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-01T04:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266473#M169110</link>
      <description>&lt;P&gt;So in my prior reply, I pasted code for Example execution...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You can copy that code, as it is, into a new blank query. Same as you did with the function.&lt;/P&gt;
&lt;P&gt;This query is just an example of the function envoked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The AddCustom and ExpandedCustom steps are what you want to add to your table.&lt;/P&gt;
&lt;P&gt;I included that so you could see how it functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you add these steps, you will need to change 'Source' to whatever the previous step in your table is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 05:59:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266473#M169110</guid>
      <dc:creator>KNP</dc:creator>
      <dc:date>2024-11-01T05:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266737#M169126</link>
      <description>&lt;P&gt;When I add the the first step, I get Table in all rows. Highlighting a row here, I can see Error in all rows under fSplitCombineOrder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what's wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 09:54:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4266737#M169126</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-01T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4267256#M169166</link>
      <description>&lt;P&gt;Can you paste your code? (just change anything sensitive).&lt;/P&gt;
&lt;P&gt;It's a bit hard to debug without seeing it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 17:11:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4267256#M169166</guid>
      <dc:creator>KNP</dc:creator>
      <dc:date>2024-11-01T17:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4267450#M169191</link>
      <description>&lt;P&gt;If you could turn to a colleague who is really proficient in both Power Query and Python, he/she might help you implement this simple solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCq5MyUutVNBV8AsO11HwTc1Jyi8tyksFCoR5OusoOCfmJaUWFSUC+Y7OIXpKsTokatFRiKgAAiDH2ckRqD8WAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [String = _t]),
    #"Run Python script" = Python.Execute("import re#(lf)import pandas as pd#(lf)#(lf)def extract(string):#(lf)    matches = re.finditer(r'(?&amp;lt;= )\w+(?=[,.])', string, re.I)#(lf)    return ','.join([m.group() for m in matches])#(lf)#(lf)dataset['Extract'] = dataset['String'].apply(extract)",[dataset=Source]),
    dataset = #"Run Python script"{[Name="dataset"]}[Value]
in
    dataset&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 21:31:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4267450#M169191</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2024-11-01T21:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4301730#M170808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="803517" data-lia-user-login="Silvard" class="lia-mention lia-mention-user"&gt;Silvard&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How is the situation now? If the problem has been solved, please accept replies you find helpful as solutions.&lt;/P&gt;
&lt;P&gt;Here is another method about calculated column for your reference, but the disadvantage of this method is that it cannot be sorted alphabetically.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ConcatenatedCharacters = 
VAR CommaPositions = 
    ADDCOLUMNS(
        GENERATESERIES(1, LEN('Table'[Location])),
        "Position", FIND("-", 'Table'[Location], [Value], LEN('Table'[Location]))
    )
VAR DISPOST = DISTINCT(SELECTCOLUMNS(CommaPositions,[Position]))
VAR Characters = 
   CONCATENATEX(
        
            ADDCOLUMNS(
                DISPOST,
                "CharAfterComma", MID('Table'[Location], [Position] + 1, 4)
            ),
        [CharAfterComma],
        ","
    )
    
RETURN Characters&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Mengmeng Li&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 08:47:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4301730#M170808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-26T08:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Extract text between every occurrence of delimeters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4302302#M170824</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have solved it using the below DAX structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Extract &amp;nbsp;= &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR InputText = 'YourTable'[YourColumn]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR FirstDashPos = FIND(" - ", InputText, 1, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR FirstCommaPos = FIND(", ", InputText, FirstDashPos + 3, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR FirstWord = IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;AND(FirstDashPos &amp;gt; 0, FirstCommaPos &amp;gt; FirstDashPos),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;MID(InputText, FirstDashPos + 3, FirstCommaPos - FirstDashPos - 3),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;BLANK()&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR SecondDashPos = IF(FirstCommaPos &amp;gt; 0, FIND(" - ", InputText, FirstCommaPos + 2, 0), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR SecondCommaPos = IF(SecondDashPos &amp;gt; 0, FIND(", ", InputText, SecondDashPos + 3, 0), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR SecondWord = IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;AND(SecondDashPos &amp;gt; 0, SecondCommaPos &amp;gt; SecondDashPos),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;MID(InputText, SecondDashPos + 3, SecondCommaPos - SecondDashPos - 3),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;BLANK()&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR ThirdDashPos = IF(SecondCommaPos &amp;gt; 0, FIND(" - ", InputText, SecondCommaPos + 2, 0), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR ThirdCommaPos = IF(ThirdDashPos &amp;gt; 0, FIND(", ", InputText &amp;amp; ",", ThirdDashPos + 3, 0), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;VAR ThirdWord = IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;AND(ThirdDashPos &amp;gt; 0, ThirdCommaPos &amp;gt; ThirdDashPos),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;MID(InputText, ThirdDashPos + 3, ThirdCommaPos - ThirdDashPos - 3),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;BLANK()&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;RETURN&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;CONCATENATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;CONCATENATE(FirstWord, IF(NOT(ISBLANK(SecondWord)), ", " &amp;amp; SecondWord, "")),&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;IF(NOT(ISBLANK(ThirdWord)), ", " &amp;amp; ThirdWord, "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 13:37:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extract-text-between-every-occurrence-of-delimeters/m-p/4302302#M170824</guid>
      <dc:creator>Silvard</dc:creator>
      <dc:date>2024-11-26T13:37:01Z</dc:date>
    </item>
  </channel>
</rss>

