<?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 Creating sorted table variable in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-sorted-table-variable/m-p/3310620#M123754</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp; Is there any way to make a VAR of sorted table (something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR SortedTable = 'Unsorted Table' ORDER BY 'Unsorted Table'[Column1] &lt;/LI-CODE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2023 17:02:13 GMT</pubDate>
    <dc:creator>kroman</dc:creator>
    <dc:date>2023-06-30T17:02:13Z</dc:date>
    <item>
      <title>Creating sorted table variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-sorted-table-variable/m-p/3310620#M123754</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp; Is there any way to make a VAR of sorted table (something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR SortedTable = 'Unsorted Table' ORDER BY 'Unsorted Table'[Column1] &lt;/LI-CODE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 17:02:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-sorted-table-variable/m-p/3310620#M123754</guid>
      <dc:creator>kroman</dc:creator>
      <dc:date>2023-06-30T17:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating sorted table variable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-sorted-table-variable/m-p/3311728#M123834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275285" data-lia-user-login="kroman" class="lia-mention lia-mention-user"&gt;kroman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) This is my test data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2) We can create a table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = VAR SortedTable =
    ADDCOLUMNS(
        SUMMARIZE(
            'Unsorted Table',
            'Unsorted Table'[Column1]
        ),
        "SortedColumn", 'Unsorted Table'[Column1]
    )
RETURN
    SortedTable&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 01:57:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-sorted-table-variable/m-p/3311728#M123834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-03T01:57:06Z</dc:date>
    </item>
  </channel>
</rss>

