<?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 Current day-7 days logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-day-7-days-logic/m-p/1102784#M365566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;I have a date field. I wanted to show&amp;nbsp; max(date) - 7 days in a list box. I wanted to list all the previous 7 days dates in the listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this expression but not giving me result properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;load Snapshot_Year_CurrentDay,CurrentQuarter,Snapshot_date;&lt;/P&gt;&lt;P&gt;select max(snapshot_date) as Snapshot_Year_CurrentDay,&lt;/P&gt;&lt;P&gt;max(Financial_Close_Fiscal_Year_Quarter_Code) as CurrentQuarter,&lt;/P&gt;&lt;P&gt;max(snapshot_date) as Snapshot_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;from PERSONAL_SERVICE.FACT_TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vActualsAsOf=peek('Snapshot_date',0,'Temp');&lt;/P&gt;&lt;P&gt;Let v_Max=peek('Snapshot_date');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Actual_Revenue_Tmp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SELECT &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; snapshot_date&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM PERSONAL_SYSTEMS_ATTACH_SERVICE.FACT_SV_HW_ORDER_EX_DBRD_QTR_DOD ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxDate:&lt;/P&gt;&lt;P&gt;Load Max(snapshot_date) As MaxDate&lt;/P&gt;&lt;P&gt;Resident Actual_Revenue_Tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let v_Max=peek('MaxDate');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Drop Table MaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Asof:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date($(v_Max) - iterno() + 1) as &lt;STRONG&gt;Last7Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AutoGenerate(1)&lt;/P&gt;&lt;P&gt;while iterNo() &amp;lt; 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Last7Date is not giving me proper result. can any1 help here.???please&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2016 05:56:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-06-01T05:56:26Z</dc:date>
    <item>
      <title>Current day-7 days logic</title>
      <link>https://community.qlik.com/t5/QlikView/Current-day-7-days-logic/m-p/1102784#M365566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;I have a date field. I wanted to show&amp;nbsp; max(date) - 7 days in a list box. I wanted to list all the previous 7 days dates in the listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this expression but not giving me result properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;load Snapshot_Year_CurrentDay,CurrentQuarter,Snapshot_date;&lt;/P&gt;&lt;P&gt;select max(snapshot_date) as Snapshot_Year_CurrentDay,&lt;/P&gt;&lt;P&gt;max(Financial_Close_Fiscal_Year_Quarter_Code) as CurrentQuarter,&lt;/P&gt;&lt;P&gt;max(snapshot_date) as Snapshot_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;from PERSONAL_SERVICE.FACT_TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vActualsAsOf=peek('Snapshot_date',0,'Temp');&lt;/P&gt;&lt;P&gt;Let v_Max=peek('Snapshot_date');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Actual_Revenue_Tmp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;SELECT &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; snapshot_date&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM PERSONAL_SYSTEMS_ATTACH_SERVICE.FACT_SV_HW_ORDER_EX_DBRD_QTR_DOD ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxDate:&lt;/P&gt;&lt;P&gt;Load Max(snapshot_date) As MaxDate&lt;/P&gt;&lt;P&gt;Resident Actual_Revenue_Tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let v_Max=peek('MaxDate');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Drop Table MaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Asof:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date($(v_Max) - iterno() + 1) as &lt;STRONG&gt;Last7Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AutoGenerate(1)&lt;/P&gt;&lt;P&gt;while iterNo() &amp;lt; 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Last7Date is not giving me proper result. can any1 help here.???please&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 05:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-day-7-days-logic/m-p/1102784#M365566</guid>
      <dc:creator />
      <dc:date>2016-06-01T05:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Current day-7 days logic</title>
      <link>https://community.qlik.com/t5/QlikView/Current-day-7-days-logic/m-p/1102785#M365567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean with 'not giving me proper result' exactely?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start with checking the MaxDate table, if the MaxDate has been loaded correctly. Comment the Drop Table MaxDate; and check the records in table viewer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check the variable that fetches the MaxDate ( I would also write it like this):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Let v_Max=Floor(Peek('MaxDate',0,'MaxDate'));&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 09:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-day-7-days-logic/m-p/1102785#M365567</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-01T09:24:58Z</dc:date>
    </item>
  </channel>
</rss>

