<?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: How can I add the 'ORDER BY' inside that current DAX in a way to SORT ASC? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960363#M98548</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;are you talking about to apply order directly on the table field??&lt;/P&gt;</description>
    <pubDate>Sat, 10 Dec 2022 14:43:26 GMT</pubDate>
    <dc:creator>jr3151006</dc:creator>
    <dc:date>2022-12-10T14:43:26Z</dc:date>
    <item>
      <title>How can I add the 'ORDER BY' inside that current DAX in a way to SORT ASC?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960357#M98545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure which get the dates filtered in a 'DateDimension' table, but as you can see on the imagem below, the order of months are not in the right order.&lt;BR /&gt;&lt;BR /&gt;Q: What is the right 'position' to insert the DAX 'ORDER BY' with 'ASC' parameter?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MeasureSelectedPeriods = 
IF (
ISFILTERED ( 'DateDimension' ),
CONCATENATEX (
VALUES ( DateDimension[Month-Year]  ), DateDimension[Month-Year], ", " ), "No period selected" )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;########################&lt;BR /&gt;Current result obtained&lt;BR /&gt;########################&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;########################&lt;BR /&gt;The desired/expected would be:&lt;BR /&gt;########################&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 14:40:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960357#M98545</guid>
      <dc:creator>jr3151006</dc:creator>
      <dc:date>2022-12-10T14:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add the 'ORDER BY' inside that current DAX in a way to SORT ASC?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960362#M98547</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="37151" data-lia-user-login="jr3151006" class="lia-mention lia-mention-user"&gt;jr3151006&lt;/a&gt;&amp;nbsp;If those aren't real dates but text, it is going to sort them as if they are text. Perhaps try adding a Sort By column with a real date?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 14:41:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960362#M98547</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-12-10T14:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add the 'ORDER BY' inside that current DAX in a way to SORT ASC?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960363#M98548</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;are you talking about to apply order directly on the table field??&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 14:43:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2960363#M98548</guid>
      <dc:creator>jr3151006</dc:creator>
      <dc:date>2022-12-10T14:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add the 'ORDER BY' inside that current DAX in a way to SORT ASC?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2961207#M98637</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="37151" data-lia-user-login="jr3151006" class="lia-mention lia-mention-user"&gt;jr3151006&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year_Month =
MONTH('Table'[Date]) &amp;amp;"/"&amp;amp;YEAR('Table'[Date])&lt;/LI-CODE&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _min=MINX(ALLSELECTED('Table'),[Date])
var _max=MAXX(ALLSELECTED('Table'),[Date])
var _table=
FILTER(
    'Table','Table'[Date]&amp;gt;=_min&amp;amp;&amp;amp;'Table'[Date]&amp;lt;=_max)
var _table1=
SUMMARIZE(_table,[Year_Month])
return
CONCATENATEX(_table1,[Year_Month],",")&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 02:15:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-can-I-add-the-ORDER-BY-inside-that-current-DAX-in-a-way-to/m-p/2961207#M98637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-12T02:15:29Z</dc:date>
    </item>
  </channel>
</rss>

