<?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 Month-Day sort using numeric representation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123473#M91439</link>
    <description>&lt;P&gt;I created a date format called [MonthDay] using Auto Calendar:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dual(Month($1)&amp;amp;'-'&amp;amp;Day($1), monthstart($1)) AS [MonthDay] Tagged ('$axis', '$monthday', '$qualified'),&lt;/LI-CODE&gt;
&lt;P&gt;My plan is to create a drill-down master item where the users drill down Month &amp;gt; Week Number &amp;gt; MonthDay for planting dates.&lt;BR /&gt;&lt;BR /&gt;Currently, my approach successfully extracts the month-day from each planting date and the drill down will successfully sort the month and week number generated by Auto Calendar (see screenshots).&lt;/P&gt;
&lt;P&gt;The problem is that the Month-Day field is still sorted by the actual date including the year value. So Nov-13 will appear after Nov-20 because Nov-13 was extracted from 11-13-2023 while Nov-20 was extracted from 11-20-2019. &lt;BR /&gt;&lt;BR /&gt;How can I sort the Month-Day field using a numeric representation ranging from 1-365?&lt;/P&gt;
&lt;P&gt;Screenshots for visualization:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;date.Autocalendar.month: Successfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_4-1695906115975.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117297iD848D1387C092962/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_4-1695906115975.png" alt="prayner_4-1695906115975.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;date.Autocalendar.week: Successfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_3-1695906089780.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117296iDFEDFE8AADE81382/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_3-1695906089780.png" alt="prayner_3-1695906089780.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month-Day: Unsuccessfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_2-1695906056687.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117295i2B5F22663BD0CD30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_2-1695906056687.png" alt="prayner_2-1695906056687.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 13:05:46 GMT</pubDate>
    <dc:creator>prayner</dc:creator>
    <dc:date>2023-09-28T13:05:46Z</dc:date>
    <item>
      <title>Month-Day sort using numeric representation</title>
      <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123473#M91439</link>
      <description>&lt;P&gt;I created a date format called [MonthDay] using Auto Calendar:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dual(Month($1)&amp;amp;'-'&amp;amp;Day($1), monthstart($1)) AS [MonthDay] Tagged ('$axis', '$monthday', '$qualified'),&lt;/LI-CODE&gt;
&lt;P&gt;My plan is to create a drill-down master item where the users drill down Month &amp;gt; Week Number &amp;gt; MonthDay for planting dates.&lt;BR /&gt;&lt;BR /&gt;Currently, my approach successfully extracts the month-day from each planting date and the drill down will successfully sort the month and week number generated by Auto Calendar (see screenshots).&lt;/P&gt;
&lt;P&gt;The problem is that the Month-Day field is still sorted by the actual date including the year value. So Nov-13 will appear after Nov-20 because Nov-13 was extracted from 11-13-2023 while Nov-20 was extracted from 11-20-2019. &lt;BR /&gt;&lt;BR /&gt;How can I sort the Month-Day field using a numeric representation ranging from 1-365?&lt;/P&gt;
&lt;P&gt;Screenshots for visualization:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;date.Autocalendar.month: Successfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_4-1695906115975.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117297iD848D1387C092962/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_4-1695906115975.png" alt="prayner_4-1695906115975.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;date.Autocalendar.week: Successfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_3-1695906089780.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117296iDFEDFE8AADE81382/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_3-1695906089780.png" alt="prayner_3-1695906089780.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Month-Day: Unsuccessfully sorted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_2-1695906056687.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117295i2B5F22663BD0CD30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_2-1695906056687.png" alt="prayner_2-1695906056687.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 13:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123473#M91439</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-09-28T13:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Month-Day sort using numeric representation</title>
      <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123481#M91440</link>
      <description>&lt;P&gt;MonthStart() pulls the full date of the start of the date's month. It sounds like you just want the Month(Date), or possibly something like Month(Date)*100 + Day(Date)? &lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 13:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123481#M91440</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-09-28T13:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Month-Day sort using numeric representation</title>
      <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123545#M91445</link>
      <description>&lt;P&gt;Thank you for the prompt response Or! If I understand correctly, i am creating a field where Nov-13 would have a numeric representation of 1,113.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I replaced the previous line in my post with:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  Dual(Month($1)&amp;amp;'-'&amp;amp;Day($1), Month($1)*100 + Day($1)) AS [MonthDay] Tagged ('$axis', '$monthday', '$qualified'),
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Here is the output when I enter planting_date_md.autoCalendar.MonthDay as the x-axis dimension and =[planting_date_md.autoCalendar.MonthDay] as the sorting expression in Ascending order. The order is correct, values aggregated across years, and there are no duplicate dates:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_1-1695913562192.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117315iA2B2F7B30092FC7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_1-1695913562192.png" alt="prayner_1-1695913562192.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when I enter the Drill Down Dimension (autocalendars month, week, monthday) as the x-axis dimension, dates are out-of-order. I am using =[planting_date_md.autoCalendar.MonthDay] as the sorting variable in Ascending order. When this chart is converted to a table, values are ordered by the y-axis value...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_2-1695913589870.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117316iB926A1C8C6876BEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_2-1695913589870.png" alt="prayner_2-1695913589870.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure how to sort a drill down dimension.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 15:07:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123545#M91445</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-09-28T15:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Month-Day sort using numeric representation</title>
      <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123791#M91458</link>
      <description>&lt;P&gt;Converting the boxplot to a table, the table is always sorting by Month, no matter what I enter in the sorting properties. Of course, in a table i can just click on the MonthDay column, but in a boxplot I don't have that option.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="prayner_0-1695974119692.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117369iA2C5AB1C82B10BB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="prayner_0-1695974119692.png" alt="prayner_0-1695974119692.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 07:57:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123791#M91458</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-09-29T07:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Month-Day sort using numeric representation</title>
      <link>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123815#M91459</link>
      <description>&lt;P&gt;OK, the issue is related to the week variable. After removing it, I don't get the same issue. When I remove Month, week variable is still sorting out of order. This kinda makes sense because MMM-DD is not consistently in the same week number for each year. Need to think of a workaround.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 08:46:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Month-Day-sort-using-numeric-representation/m-p/2123815#M91459</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-09-29T08:46:36Z</dc:date>
    </item>
  </channel>
</rss>

