<?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: Sort dates and compare two years in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-dates-and-compare-two-years/m-p/1803576#M1211912</link>
    <description>&lt;P&gt;theres a lot going on here and its hard to figure out whats going on without a QVW.&lt;BR /&gt;&lt;BR /&gt;one thing i did notice is that in your screenshot you are sorting your date as text.&amp;nbsp; but this could be because you are always showing only one month of data?&lt;/P&gt;&lt;P&gt;as to the sorting for weeks, you should use dates and sort it numerically&lt;/P&gt;&lt;P&gt;as for the last question, it may be because of your data model (again this without really seeing your data model)&amp;nbsp; maybe when you filtered for a date range, there is no association with the prior year - hence you lose the comparison.&amp;nbsp; to fix this, there are a few ways.&amp;nbsp; one is to create a bridge table that will create an association between your current year and your prior year so that selecting a date range for the current year selects the same date range prior year at the same time&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 15:32:20 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-04-28T15:32:20Z</dc:date>
    <item>
      <title>Sort dates and compare two years</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-dates-and-compare-two-years/m-p/1802500#M1211834</link>
      <description>&lt;P&gt;Good morning all,&lt;/P&gt;&lt;P&gt;I come to you because I have two problems that I cannot explain and solve.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;THE FIRST POINT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;By selecting a month, I'm comparing the year N and N-1 and with a correct sort.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="comparer un mois N et N-1.PNG" style="width: 671px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53637iD19FDC7E89826356/image-dimensions/671x864?v=v2" width="671" height="864" role="button" title="comparer un mois N et N-1.PNG" alt="comparer un mois N et N-1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;when I select a week, the sorting no works agin&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tri par jour et mois.PNG" style="width: 686px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53638iE44B6D0D8D81355E/image-dimensions/686x321?v=v2" width="686" height="321" role="button" title="Tri par jour et mois.PNG" alt="Tri par jour et mois.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do you create a filter that sorts correctly regardless of the Time dimension?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is what my dimension looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dim.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53639i07322FD1204930E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="dim.PNG" alt="dim.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;THE SECOND POINT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I created two DATEPICKER objects, in order to be able to enter a start date and an end date.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filtre calendrier_LI (2).jpg" style="width: 668px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53640i4909D07B3D36815B/image-dimensions/668x222?v=v2" width="668" height="222" role="button" title="filtre calendrier_LI (2).jpg" alt="filtre calendrier_LI (2).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I select dates, I lose the possibility of having my comparisons between the years.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="résultat filtre calendrier.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53641i23B4045ADE6BC3EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="résultat filtre calendrier.PNG" alt="résultat filtre calendrier.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I do not understand why !&lt;/P&gt;&lt;P&gt;Here are my two problems of the moment.&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;Best !&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 00:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-dates-and-compare-two-years/m-p/1802500#M1211834</guid>
      <dc:creator>marakud971</dc:creator>
      <dc:date>2021-04-26T00:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sort dates and compare two years</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-dates-and-compare-two-years/m-p/1803576#M1211912</link>
      <description>&lt;P&gt;theres a lot going on here and its hard to figure out whats going on without a QVW.&lt;BR /&gt;&lt;BR /&gt;one thing i did notice is that in your screenshot you are sorting your date as text.&amp;nbsp; but this could be because you are always showing only one month of data?&lt;/P&gt;&lt;P&gt;as to the sorting for weeks, you should use dates and sort it numerically&lt;/P&gt;&lt;P&gt;as for the last question, it may be because of your data model (again this without really seeing your data model)&amp;nbsp; maybe when you filtered for a date range, there is no association with the prior year - hence you lose the comparison.&amp;nbsp; to fix this, there are a few ways.&amp;nbsp; one is to create a bridge table that will create an association between your current year and your prior year so that selecting a date range for the current year selects the same date range prior year at the same time&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 15:32:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-dates-and-compare-two-years/m-p/1803576#M1211912</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-04-28T15:32:20Z</dc:date>
    </item>
  </channel>
</rss>

