<?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 QlikSense - sort by expression with Overdue... in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/QlikSense-sort-by-expression-with-Overdue/m-p/1310936#M27976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to develop a custom sort by expression in a pivot table where:&lt;/P&gt;&lt;P&gt;a. anything before today is in a bucket called 'Overdue...'&lt;/P&gt;&lt;P&gt;b. the next three months are by their month name&lt;/P&gt;&lt;P&gt;c. anything past three months is in a bucket called 'Future...'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the figures in their respective buckets - 'Overdue...', 'APR-2017', 'MAY-2017', 'JUN-2017', 'Future...' using an expression in a column of the pivot:&lt;/P&gt;&lt;P&gt;if(match(Tran_type,'O_BANK'), &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;lt; date(Monthname(today()),'MMM-YYYY'), 'Overdue...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;gt; date(Monthname(addmonths(today(),2)),'MMM-YYYY'), 'Future...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Monthname(SO_Promised_Date),'MMM-YYYY'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However they are not sorting in the correct order.&amp;nbsp; They are currently sorting MAY-2017, APR-2017, Overdue..., Future..., JUN-2017.&amp;nbsp; I am using the expression:&lt;/P&gt;&lt;P&gt;WildMatch(&lt;/P&gt;&lt;P&gt;(if(match(Tran_type,'O_BANK'), &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;lt; date(Monthname(today()),'MMM-YYYY'), 'Overdue...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;gt; date(Monthname(addmonths(today(),2)),'MMM-YYYY'), 'Future...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Monthname(SO_Promised_Date),'MMM-YYYY'))))),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Overdue...', date(Monthname(SO_Promised_Date),'MMM-YYYY'), 'Future...')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone see where I am going wrong?&amp;nbsp; I have been through so many posts but cannot find anything that works for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Apr 2017 03:23:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-04-13T03:23:56Z</dc:date>
    <item>
      <title>QlikSense - sort by expression with Overdue...</title>
      <link>https://community.qlik.com/t5/App-Development/QlikSense-sort-by-expression-with-Overdue/m-p/1310936#M27976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to develop a custom sort by expression in a pivot table where:&lt;/P&gt;&lt;P&gt;a. anything before today is in a bucket called 'Overdue...'&lt;/P&gt;&lt;P&gt;b. the next three months are by their month name&lt;/P&gt;&lt;P&gt;c. anything past three months is in a bucket called 'Future...'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the figures in their respective buckets - 'Overdue...', 'APR-2017', 'MAY-2017', 'JUN-2017', 'Future...' using an expression in a column of the pivot:&lt;/P&gt;&lt;P&gt;if(match(Tran_type,'O_BANK'), &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;lt; date(Monthname(today()),'MMM-YYYY'), 'Overdue...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;gt; date(Monthname(addmonths(today(),2)),'MMM-YYYY'), 'Future...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Monthname(SO_Promised_Date),'MMM-YYYY'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However they are not sorting in the correct order.&amp;nbsp; They are currently sorting MAY-2017, APR-2017, Overdue..., Future..., JUN-2017.&amp;nbsp; I am using the expression:&lt;/P&gt;&lt;P&gt;WildMatch(&lt;/P&gt;&lt;P&gt;(if(match(Tran_type,'O_BANK'), &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;lt; date(Monthname(today()),'MMM-YYYY'), 'Overdue...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(date(Monthname(SO_Promised_Date),'MMM-YYYY') &amp;gt; date(Monthname(addmonths(today(),2)),'MMM-YYYY'), 'Future...',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Monthname(SO_Promised_Date),'MMM-YYYY'))))),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Overdue...', date(Monthname(SO_Promised_Date),'MMM-YYYY'), 'Future...')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone see where I am going wrong?&amp;nbsp; I have been through so many posts but cannot find anything that works for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Apr 2017 03:23:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/QlikSense-sort-by-expression-with-Overdue/m-p/1310936#M27976</guid>
      <dc:creator />
      <dc:date>2017-04-13T03:23:56Z</dc:date>
    </item>
  </channel>
</rss>

