<?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 Logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137957#M759283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Aug 2018 06:48:16 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2018-08-31T06:48:16Z</dc:date>
    <item>
      <title>Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137956#M759282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Please find the attachment of the qvw file and excel sheet ..&lt;/P&gt;&lt;P&gt;I want to create a table chart and a bar chart with the excel data which is attached by weeks , and years as shown in the screenshot below&lt;/P&gt;&lt;P&gt;basically i want to group the created date , into 1week ,&amp;gt; 1 week , 3month, 1 year and so on .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212280" alt="Date.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212280_Date.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Need your help in achieving this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137956#M759282</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137957#M759283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this qvw file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 06:48:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137957#M759283</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-08-31T06:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137958#M759284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Kaushik .&lt;/P&gt;&lt;P&gt;Can you please explain me why used max of created date ?&lt;/P&gt;&lt;P&gt;I dont Understand in the script , when you have droped Delta , then still how can i see all the fileds in the data table ? &lt;/P&gt;&lt;P&gt;what kind of logic is this ..If you can explain it will be really helpfull leaning for me &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with the existing bucked will be able to achive this also ? as shown in the screenshot below ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212304" alt="Date2.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212304_Date2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 06:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137958#M759284</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2018-08-31T06:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137959#M759285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain what it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very first thing we need is bucket and for that I have used the days difference between today (In your case the Max Date from data) and created Date.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;MaxDate:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Load Max(Created) as MaxDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Delta;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Let vMaxDate = num(Peek('MaxDate',0,'MaxDate'));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once we have this days difference we can easily bifurcate them in the expected buckets using the if statement. i,e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *,if(Diff &amp;lt;7,'&amp;lt; 1 Week',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Diff &amp;lt;=31,'&amp;gt; 1 Week',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Diff &amp;lt;=91,'&amp;gt; 1 Month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Diff &amp;lt;=180,'&amp;gt; 3 Month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Diff &amp;lt;=365,'&amp;gt; 6 Month',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Diff &amp;lt;=730,'&amp;gt; 1 Year','&amp;gt; 2 Year')))))) as Bucket;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to answer your question on why you see fields even if the table is dropped.&lt;/P&gt;&lt;P&gt;If you notice I have created another table using the existing table i.e &lt;STRONG&gt;Delta., &lt;/STRONG&gt;which has the similar data (Fields) plus some additional calculated field like &lt;STRONG&gt;Bucket&lt;/STRONG&gt;. So now we would have duplicate data and thus I have dropped the Delta Table, as we dont need it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 07:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137959#M759285</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-08-31T07:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137960#M759286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ho Do i get the Average days , as shown in the screenshot below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Date2.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/212322_Date2.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 09:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137960#M759286</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2018-08-31T09:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137961#M759287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You Should use the Below function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(Aggr(Count(Date),Bucket)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 16:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Logic/m-p/137961#M759287</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-08-31T16:04:42Z</dc:date>
    </item>
  </channel>
</rss>

