<?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 Rolling Weeks Sorting in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Rolling-Weeks-Sorting/m-p/1655507#M49014</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;I've a problem. I've calculated rolling weeks a year back (52) with this formula:&lt;/P&gt;&lt;P&gt;=IF(WeekYear(Today())=WeeKYear(Timestamp) AND Week(Timestamp)&amp;lt;Week(Today()),'W-'&amp;amp;Week(Order.Leverdatum),&lt;BR /&gt;IF(WeekYear(Timestamp)=WeekYear(Today())-1 AND Week(Timestamp)&amp;gt;=Week(Today()),'W-'&amp;amp;Week(Timestamp)&amp;amp;' (`'&amp;amp;Right(WeekYear(Timestamp),2)&amp;amp;')'))&lt;/P&gt;&lt;P&gt;For all the weeks in this year, I didn't add the year in brakes, for those from last year I did. With the following result / lay-out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Week Sorting.PNG" style="width: 96px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25172i384B0B5084905568/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Week Sorting.PNG" alt="Qlik Week Sorting.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However my preferrerd result is W-49, W-48, W-47 ... W-52 ('18), W-51 ('18), W-50 ('18) (newest weeks first). When I want to sort by expression date or weekyear, the sorting didn't react.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I sort these rolling weeks in the preferred order?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:53:13 GMT</pubDate>
    <dc:creator>Bart_Breekveldt</dc:creator>
    <dc:date>2024-11-16T03:53:13Z</dc:date>
    <item>
      <title>Rolling Weeks Sorting</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-Weeks-Sorting/m-p/1655507#M49014</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;I've a problem. I've calculated rolling weeks a year back (52) with this formula:&lt;/P&gt;&lt;P&gt;=IF(WeekYear(Today())=WeeKYear(Timestamp) AND Week(Timestamp)&amp;lt;Week(Today()),'W-'&amp;amp;Week(Order.Leverdatum),&lt;BR /&gt;IF(WeekYear(Timestamp)=WeekYear(Today())-1 AND Week(Timestamp)&amp;gt;=Week(Today()),'W-'&amp;amp;Week(Timestamp)&amp;amp;' (`'&amp;amp;Right(WeekYear(Timestamp),2)&amp;amp;')'))&lt;/P&gt;&lt;P&gt;For all the weeks in this year, I didn't add the year in brakes, for those from last year I did. With the following result / lay-out:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Week Sorting.PNG" style="width: 96px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25172i384B0B5084905568/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Week Sorting.PNG" alt="Qlik Week Sorting.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However my preferrerd result is W-49, W-48, W-47 ... W-52 ('18), W-51 ('18), W-50 ('18) (newest weeks first). When I want to sort by expression date or weekyear, the sorting didn't react.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I sort these rolling weeks in the preferred order?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-Weeks-Sorting/m-p/1655507#M49014</guid>
      <dc:creator>Bart_Breekveldt</dc:creator>
      <dc:date>2024-11-16T03:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Weeks Sorting</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-Weeks-Sorting/m-p/1655595#M49021</link>
      <description>&lt;P&gt;It would appear that what you're looking for is this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dates.jpg" style="width: 872px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/25190i02FB23BB826E38B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dates.jpg" alt="Dates.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If so, I've adjusted your code to be the following where "DateField" is to be substituted with your value (perhaps "&lt;SPAN&gt;Order.Leverdatum"?)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=IF(WeeKYear(DateField)&amp;lt;WeekYear(Today()),'W-'&amp;amp;Week(DateField)&amp;amp;' (`'&amp;amp;Right(WeekYear(DateField),2)&amp;amp;')','W-'&amp;amp;Week(DateField))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample attached.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 17:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-Weeks-Sorting/m-p/1655595#M49021</guid>
      <dc:creator>andoryuu</dc:creator>
      <dc:date>2019-12-09T17:49:20Z</dc:date>
    </item>
  </channel>
</rss>

