<?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 Extracting unique values with a condition in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746680#M84612</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column with text that looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fixed-Fixed-Postpaid-Fixed-OMB-OMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a formula that will return only unique values in between the dashes (-)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required: Fixed-Postpaid-Fixed-OMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 03:00:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-05T03:00:34Z</dc:date>
    <item>
      <title>Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746680#M84612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column with text that looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fixed-Fixed-Postpaid-Fixed-OMB-OMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a formula that will return only unique values in between the dashes (-)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required: Fixed-Postpaid-Fixed-OMB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 03:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746680#M84612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-05T03:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746729#M84614</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In Power Query Refer TextBetweenDelimiters, Also use relative position &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer example 3- &lt;A href="https://docs.microsoft.com/en-us/powerquery-m/text-betweendelimiters#example-3" target="_blank"&gt;https://docs.microsoft.com/en-us/powerquery-m/text-betweendelimiters#example-3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use in a similar video&lt;/P&gt;
&lt;P&gt;Text Before Delimiter and Text After Delimiter: &lt;A href="https://youtu.be/oGY4RoPKDOE" target="_blank"&gt;https://youtu.be/oGY4RoPKDOE&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 03:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746729#M84614</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-05T03:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746760#M84620</link>
      <description>&lt;P&gt;This is what I need but unfortunately I am unable to use this method as mine is a calculated column&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 03:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746760#M84620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-05T03:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746864#M84628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;NewColumn =
VAR String = TableName[ColumnName]
VAR Items =
    SUBSTITUTE ( String, "-", "|" )
VAR Length =
    PATHLENGTH ( Items )
VAR T1 =
    GENERATESERIES ( 1, Length, 1 )
VAR T2 =
    ADDCOLUMNS ( T1, "@Item", PATHITEM ( Items, [Value] ) )
VAR T3 =
    DISTINCT ( SELECTCOLUMNS ( T2, "@@Item", [@Item] ) )
RETURN
    CONCATENATEX ( T3, [@@Item], "-", [@@Item], ASC )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Sep 2022 05:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746864#M84628</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-05T05:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746981#M84636</link>
      <description>&lt;P&gt;Thanks for this. Can I use this code via "New Column"? I did that and got this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The arguments in GenerateSeries function cannot be blank"&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 06:46:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2746981#M84636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-05T06:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2747062#M84638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Apologies, I was outside the office when I shared the solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this is a calculated column but its seems that you have some blank cells. Just modify as follows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;NewColumn =
VAR String = TableName[ColumnName]
VAR Items =
    SUBSTITUTE ( String, "-", "|" )
VAR Length =
    COALESCE ( PATHLENGTH ( Items ), 1 )
VAR T1 =
    GENERATESERIES ( 1, Length, 1 )
VAR T2 =
    ADDCOLUMNS ( T1, "@Item", PATHITEM ( Items, [Value] ) )
VAR T3 =
    DISTINCT ( SELECTCOLUMNS ( T2, "@@Item", [@Item] ) )
RETURN
    CONCATENATEX ( T3, [@@Item], "-", [@@Item], ASC )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 07:30:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2747062#M84638</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-05T07:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting unique values with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2747486#M84662</link>
      <description>&lt;P&gt;Thank you so much, you have made my day/week/month! I have been scouring the internet for almost a week and have not been able to find a solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 09:52:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Extracting-unique-values-with-a-condition/m-p/2747486#M84662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-05T09:52:34Z</dc:date>
    </item>
  </channel>
</rss>

