<?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: YTD Dates &amp;amp; Sorting in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/YTD-Dates-amp-Sorting/m-p/2197916#M33002</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you to create a calendar table by dax and then relate this date table with your fact table by date columns.&lt;/P&gt;
&lt;P&gt;Date Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar = 
ADDCOLUMNS (
    CALENDARAUTO (),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName",FORMAT([Date],"MMMM"),
    "MonthShortName",FORMAT([Date],"MMM"),
    "Day", DAY ( [Date] ),
    "YearMonth",
        YEAR ( [Date] ) * 100
            + MONTH ( [Date] ),
    "Mon-Day", FORMAT ( [Date], "dd-mmm" )
)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 640px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/633546i475A1226C7A2A90D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then you can create your visuals with Date hierachy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Nov 2021 05:48:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-19T05:48:14Z</dc:date>
    <item>
      <title>YTD Dates &amp; Sorting</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/YTD-Dates-amp-Sorting/m-p/2193248#M32946</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;Trying my hands on typial developement of Power BI first time from other tools now&lt;/P&gt;&lt;P&gt;1. Want to display YTD dates (1-jan till today) as one of the axis&lt;/P&gt;&lt;P&gt;2. want to sort those values in ascending order as 1-jan,2-jan etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Request you to please advise on same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Date field with hierarchy and i know i can create custom column under modelling ,but will that be suitable option or something else needs to be done&lt;/P&gt;&lt;P&gt;Please advise&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 21:20:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/YTD-Dates-amp-Sorting/m-p/2193248#M32946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-16T21:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Dates &amp; Sorting</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/YTD-Dates-amp-Sorting/m-p/2197916#M33002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you to create a calendar table by dax and then relate this date table with your fact table by date columns.&lt;/P&gt;
&lt;P&gt;Date Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calendar = 
ADDCOLUMNS (
    CALENDARAUTO (),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName",FORMAT([Date],"MMMM"),
    "MonthShortName",FORMAT([Date],"MMM"),
    "Day", DAY ( [Date] ),
    "YearMonth",
        YEAR ( [Date] ) * 100
            + MONTH ( [Date] ),
    "Mon-Day", FORMAT ( [Date], "dd-mmm" )
)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 640px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/633546i475A1226C7A2A90D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then you can create your visuals with Date hierachy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 05:48:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/YTD-Dates-amp-Sorting/m-p/2197916#M33002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-19T05:48:14Z</dc:date>
    </item>
  </channel>
</rss>

