<?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: Date group by is not working. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965318#M1220328</link>
    <description>&lt;P&gt;Thanks&amp;nbsp; &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16737"&gt;@BrunPierre&lt;/a&gt;&amp;nbsp;, It worked!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some syntax here and there, and Group by and Order by would not work together. But, I got the idea. Thanks again!&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 15:34:45 GMT</pubDate>
    <dc:creator>Vishal</dc:creator>
    <dc:date>2022-08-05T15:34:45Z</dc:date>
    <item>
      <title>Date group by is not working.</title>
      <link>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965200#M1220323</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to below table, wherein I have 'SHIP_DATE' and 'QYT_DISPENSED', and the column Z i.e. 'week_date' I have created using the code as -&amp;nbsp;&lt;STRONG&gt;date(if(WeekDay(SHIP_DATE,0)=4,SHIP_DATE, WeekEnd(SHIP_DATE,0,4)+1)) as week_date&amp;nbsp;&lt;/STRONG&gt;- which is basically giving Friday if the date is Friday, otherwise round off the date to the next Friday.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vishal_0-1659698259227.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86057i48AF779AF49C3224/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vishal_0-1659698259227.png" alt="Vishal_0-1659698259227.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now, I need to replicate the below SAS code into Qlikview -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vishal_0-1659701644090.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86072i2BA086416EF65C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vishal_0-1659701644090.png" alt="Vishal_0-1659701644090.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have used the below code -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vishal_2-1659699982251.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86064i420D14973747776C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vishal_2-1659699982251.png" alt="Vishal_2-1659699982251.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, the result is not as I wanted. It may seem trivial to some but I am really stuck here. Kindly help. The result I am getting is -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vishal_3-1659700232035.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86065i19DDD8F1AA9A3ADC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vishal_3-1659700232035.png" alt="Vishal_3-1659700232035.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is supposed to show 04-22-16 = 16 or 04-15-16 = 6. It is not grouping the dates as its supposed to. The problem I have figured is that it is grouping the 'QYT_DISPENSED' of actual Fridays separately than the dates I have converted to Friday. See below -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vishal_4-1659701224782.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/86068i6C3568C12E8E2F2F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vishal_4-1659701224782.png" alt="Vishal_4-1659701224782.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please help! Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 12:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965200#M1220323</guid>
      <dc:creator>Vishal</dc:creator>
      <dc:date>2022-08-05T12:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date group by is not working.</title>
      <link>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965254#M1220325</link>
      <description>&lt;P&gt;Maybe this;&lt;/P&gt;
&lt;P&gt;[Temp_interim.nps_starter_pack];&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD DATE(DATE#(week_date,'DD-MM-YYYY'),'MM-DD-YYYY') as weekdate,&lt;BR /&gt;QTY_DISPENSED as NPS,&lt;BR /&gt;'SD_starter_pack_NPS' as Flag&lt;/P&gt;
&lt;P&gt;resident interim.SD_final;&lt;BR /&gt;Where wildmatch(NDC_NBR,'000123456') and not wildmatch(ACCOUNT_NAME,'*BLOCKED*');&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;interim.nps_starter_pack:&lt;BR /&gt;LOAD weekdate,&lt;BR /&gt;Flag,&lt;BR /&gt;SUM(NPS) as NPS,&lt;/P&gt;
&lt;P&gt;resident [Temp_interim.nps_starter_pack]&lt;BR /&gt;Group by weekdate,Flag;&lt;BR /&gt;Order by weekdate,Flag;&lt;BR /&gt;Drop table [Temp_interim.nps_starter_pack];&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 14:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965254#M1220325</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-08-05T14:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date group by is not working.</title>
      <link>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965318#M1220328</link>
      <description>&lt;P&gt;Thanks&amp;nbsp; &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16737"&gt;@BrunPierre&lt;/a&gt;&amp;nbsp;, It worked!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some syntax here and there, and Group by and Order by would not work together. But, I got the idea. Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 15:34:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-group-by-is-not-working/m-p/1965318#M1220328</guid>
      <dc:creator>Vishal</dc:creator>
      <dc:date>2022-08-05T15:34:45Z</dc:date>
    </item>
  </channel>
</rss>

