<?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: Sorting a single column table within a measure? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013318#M158069</link>
    <description>&lt;P&gt;Oh yeah, CONCATENATEX comes with sorting parameters! Thank you, man. This is not a generic sorting function, but it solves the problem &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 11:22:29 GMT</pubDate>
    <dc:creator>Martin_D</dc:creator>
    <dc:date>2024-06-27T11:22:29Z</dc:date>
    <item>
      <title>Sorting a single column table within a measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013290#M158065</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Is there a way to sort a table within a measure?&lt;/P&gt;
&lt;P&gt;The case:&lt;/P&gt;
&lt;P&gt;I have a column 'Customer'[City] (could be any text column).&lt;/P&gt;
&lt;P&gt;I want to CONCTENATEX the first five city names in the context, based on alphabetical order.&lt;/P&gt;
&lt;P&gt;Using &lt;BR /&gt;CONCATENATEX ( TOPN ( 5, DISTINCT (&amp;nbsp;'Customer'[City] ), [City], ASC ), [City], ", " )&lt;BR /&gt;works fine in that way that it always selects the correct cities, but the sorting is not applied to the output table of TOPN, it's just applied as a selection criterion. Since I want to concatenate the cities in alphabetical order, is there a way to express this order in a DAX measure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 10:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013290#M158065</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2024-06-27T10:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a single column table within a measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013311#M158068</link>
      <description>&lt;P&gt;Give this a try&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CONCATENATEX (
    SELECTCOLUMNS (
        TOPN (
            5,
            DISTINCT ( 'Customer'[City] ),
            'Customer'[City], ASC
        ),
        "City", 'Customer'[City]
    ),
    [City],
    ", ",
    'Customer'[City], ASC
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Jun 2024 11:15:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013311#M158068</guid>
      <dc:creator>aduguid</dc:creator>
      <dc:date>2024-06-27T11:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a single column table within a measure?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013318#M158069</link>
      <description>&lt;P&gt;Oh yeah, CONCATENATEX comes with sorting parameters! Thank you, man. This is not a generic sorting function, but it solves the problem &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 11:22:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sorting-a-single-column-table-within-a-measure/m-p/4013318#M158069</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2024-06-27T11:22:29Z</dc:date>
    </item>
  </channel>
</rss>

