<?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 Sort Sales Line Chart by Day/Month Dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sort-Sales-Line-Chart-by-Day-Month-Dimension/m-p/2053101#M86536</link>
    <description>&lt;P&gt;Any insight on how to fix the following sorting issue?&lt;/P&gt;
&lt;P&gt;I have a line chart of "Daily Sales" which compared the sum of sales for a Month/Day range (we'll call this Measure1) against the same period the previous year (we'll call this Measure2). I cannot get it to sort by Month/Day to save my life.&amp;nbsp; the chart&amp;nbsp; will sort by Month/Day for any date that has a value for Measure1 regardless if there is a value for the same Month/Day in Measure2 but if there is no value in Measure1, the Month/Day is placed at the end of the chart.&lt;/P&gt;
&lt;P&gt;Making the Month/Day value into a number instead of a date will allow to sort correctly until your date range overlaps years. So in the screen shot below we are comparing '2022-24-11 thru 2023-24-03' against' 2021-24-11 thru 2022-24-03' sorted by date shows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mark_Miron_1-1679686763416.png" style="width: 777px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103471i2972E8C642556A96/image-dimensions/777x402?v=v2" width="777" height="402" role="button" title="Mark_Miron_1-1679686763416.png" alt="Mark_Miron_1-1679686763416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Whereas, if i convert the Month/Day value to a number all the November and December dates get thrown to the end of chart:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mark_Miron_2-1679687066940.png" style="width: 773px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103472iAFD885E700CE20B7/image-dimensions/773x400?v=v2" width="773" height="400" role="button" title="Mark_Miron_2-1679687066940.png" alt="Mark_Miron_2-1679687066940.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Mar 2023 19:47:37 GMT</pubDate>
    <dc:creator>Mark_Miron</dc:creator>
    <dc:date>2023-03-24T19:47:37Z</dc:date>
    <item>
      <title>Sort Sales Line Chart by Day/Month Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-Sales-Line-Chart-by-Day-Month-Dimension/m-p/2053101#M86536</link>
      <description>&lt;P&gt;Any insight on how to fix the following sorting issue?&lt;/P&gt;
&lt;P&gt;I have a line chart of "Daily Sales" which compared the sum of sales for a Month/Day range (we'll call this Measure1) against the same period the previous year (we'll call this Measure2). I cannot get it to sort by Month/Day to save my life.&amp;nbsp; the chart&amp;nbsp; will sort by Month/Day for any date that has a value for Measure1 regardless if there is a value for the same Month/Day in Measure2 but if there is no value in Measure1, the Month/Day is placed at the end of the chart.&lt;/P&gt;
&lt;P&gt;Making the Month/Day value into a number instead of a date will allow to sort correctly until your date range overlaps years. So in the screen shot below we are comparing '2022-24-11 thru 2023-24-03' against' 2021-24-11 thru 2022-24-03' sorted by date shows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mark_Miron_1-1679686763416.png" style="width: 777px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103471i2972E8C642556A96/image-dimensions/777x402?v=v2" width="777" height="402" role="button" title="Mark_Miron_1-1679686763416.png" alt="Mark_Miron_1-1679686763416.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Whereas, if i convert the Month/Day value to a number all the November and December dates get thrown to the end of chart:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mark_Miron_2-1679687066940.png" style="width: 773px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/103472iAFD885E700CE20B7/image-dimensions/773x400?v=v2" width="773" height="400" role="button" title="Mark_Miron_2-1679687066940.png" alt="Mark_Miron_2-1679687066940.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 19:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-Sales-Line-Chart-by-Day-Month-Dimension/m-p/2053101#M86536</guid>
      <dc:creator>Mark_Miron</dc:creator>
      <dc:date>2023-03-24T19:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sort Sales Line Chart by Day/Month Dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-Sales-Line-Chart-by-Day-Month-Dimension/m-p/2053269#M86546</link>
      <description>&lt;P&gt;It should be just about logic. Is it a date or is it a string showing&amp;nbsp;&lt;SPAN&gt;Month/Day ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If it is a string , then try this for sorting:&lt;/P&gt;
&lt;P&gt;Sort by expression, Numerically ascending&lt;/P&gt;
&lt;P&gt;= (Num(Subfield([Month/Day], '/', 1)) * 12) +&amp;nbsp;Num(Subfield([Month/Day], '/', 2))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 21:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-Sales-Line-Chart-by-Day-Month-Dimension/m-p/2053269#M86546</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2023-03-26T21:57:11Z</dc:date>
    </item>
  </channel>
</rss>

