<?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: Max(snapshot) by Yr-Week? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71933#M777317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that is correct.&amp;nbsp; Either of these flags should have a value for this 2018-2 record to be included in the chart and I'm not able to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 13:46:50 GMT</pubDate>
    <dc:creator>xarapre7</dc:creator>
    <dc:date>2018-04-20T13:46:50Z</dc:date>
    <item>
      <title>Max(snapshot) by Yr-Week?</title>
      <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71931#M777315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to get the max (snapshots) by Yr-Wk.&amp;nbsp; I was able to get the max(snapshot) for Wks 3-5 but not for Yr-Wk 2018-2 which should show a value of 2400 (1st record in the below table).&amp;nbsp; I'm using this expression for the Dimesion: =if(MaxYearWkDateFlag = 1 or MonthEndDateFlag = 1, Year_Week) and then, just counting the Service ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Yr-Wk.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200290_Yr-Wk.jpg" style="height: 386px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that you'll be able to help me with this.&amp;nbsp; &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/Max-snapshot-by-Yr-Week/m-p/71931#M777315</guid>
      <dc:creator>xarapre7</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max(snapshot) by Yr-Week?</title>
      <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71932#M777316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as per the DATA .. Your IF Condition is failing &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(MaxYearWkDateFlag = 1 or MonthEndDateFlag = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; as for 2018-2 both values are NULL, this record is not coming in your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please verify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;CY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 13:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71932#M777316</guid>
      <dc:creator>ychaitanya</dc:creator>
      <dc:date>2018-04-20T13:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Max(snapshot) by Yr-Week?</title>
      <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71933#M777317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that is correct.&amp;nbsp; Either of these flags should have a value for this 2018-2 record to be included in the chart and I'm not able to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 13:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71933#M777317</guid>
      <dc:creator>xarapre7</dc:creator>
      <dc:date>2018-04-20T13:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Max(snapshot) by Yr-Week?</title>
      <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71934#M777318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's the logic for deriving the Flags ?&lt;/P&gt;&lt;P&gt;so that we can try checking that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;CY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 13:58:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71934#M777318</guid>
      <dc:creator>ychaitanya</dc:creator>
      <dc:date>2018-04-20T13:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Max(snapshot) by Yr-Week?</title>
      <link>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71935#M777319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chaitanya...thanks for trying to look into this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is basically to get the max snapshot date per week.&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;So for Jan 2018, we have the following :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;WK-1 for Jan 1-6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;WK-2 for Jan 7-13&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;WK-3 for Jan14-20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;WK-4 for Jan 21-27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;WK-5 for Jan 28-31 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The 1st flag is actually taking the max(snapshot) for that Calendar Wk (Wk-2, Wk-3, etc) and the 2nd flag is for the max(snapshot) which may fall for the last day of the month.&amp;nbsp;&amp;nbsp; I don't know why isn't it taking the max snapshot for WK-2 though which shouldn't be the case.&amp;nbsp; Below is the script for these flags:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DATE1:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FULL_DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(FULL_DATE,'YYYY-MM-DD') AS Calendar_Date,&lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left join(DATE1):&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Max([Calendar Date]),'YYYY-MM-DD') as Calendar_Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 as MaxYearWkDateFlag1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;FROM&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;left join (DATE1)&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date#(Date(MaxMonthSnapshotDate,'YYYY-MM-DD'),'YYYY-MM-DD') as&amp;nbsp; Calendar_Date,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/*&amp;nbsp; NOTE: MaxMonthSnapshotDate - is previously derived from taking the max(snapshot) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; as MaxYearWkDateFlag2&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;FROM&amp;nbsp; ...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DATE:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;AutoNumber(FULL_DATE,'%CreateDate')&amp;nbsp; as %CreateDate,&lt;/P&gt;&lt;P&gt;if(isnull(MaxYearWkDateFlag1),0,MaxYearWkDateFlag1) + &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(isnull(MaxYearWkDateFlag2),0,MaxYearWkDateFlag2) as MaxYearWkDateFlag&lt;/P&gt;&lt;P&gt;,*&lt;/P&gt;&lt;P&gt;RESIDENT DATE1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hoping for your kind assistance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-snapshot-by-Yr-Week/m-p/71935#M777319</guid>
      <dc:creator>xarapre7</dc:creator>
      <dc:date>2018-04-20T15:13:54Z</dc:date>
    </item>
  </channel>
</rss>

