<?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: Set Analysis previous week in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408658#M484140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try just subtracting 7 days from your min and max dates to retrieve the dates from the prev. week:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;t_Date = {"&amp;gt;=$(=Date(min(t_Date)-7))&amp;lt;=$(=Date(max(t_Date)-7))"}&amp;gt;} Clicks)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that t_Date is formatted like your standard DateFormat set in the script (otherwise use a format string with the Date() functions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both above expression and your set expression for prev. month will not neccesarily return the same dates in the prev month (compared with your selected dates), because you are using an advanced search with a range (i.e. using a lower and upper limit), so if you select say two dates only, May 10th and May 15th, the set expression will return 6 dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 May 2013 10:15:24 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-05-26T10:15:24Z</dc:date>
    <item>
      <title>Set Analysis previous week</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408657#M484139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently im using the following function when in need to compare between selected dates and the same dates in the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;t_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=AddMonths(min(t_Date),-1)) &amp;lt;=$(=AddMonths(max(t_Date),-1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Clicks&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i need also to compare selected&amp;nbsp; week days to previous week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help or tip&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 May 2013 09:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408657#M484139</guid>
      <dc:creator />
      <dc:date>2013-05-26T09:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis previous week</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408658#M484140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try just subtracting 7 days from your min and max dates to retrieve the dates from the prev. week:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;t_Date = {"&amp;gt;=$(=Date(min(t_Date)-7))&amp;lt;=$(=Date(max(t_Date)-7))"}&amp;gt;} Clicks)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming that t_Date is formatted like your standard DateFormat set in the script (otherwise use a format string with the Date() functions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both above expression and your set expression for prev. month will not neccesarily return the same dates in the prev month (compared with your selected dates), because you are using an advanced search with a range (i.e. using a lower and upper limit), so if you select say two dates only, May 10th and May 15th, the set expression will return 6 dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 May 2013 10:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408658#M484140</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-05-26T10:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis previous week</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408659#M484141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression is really close you what you want to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13695634610221999" jivemacro_uid="_13695634610221999"&gt;&lt;P&gt;sum({&amp;lt; t_Date = {"&amp;gt;=$(=Min(t_Date -7))&amp;lt;=$(=Max(t_Date -7))"}&amp;gt;} Clicks)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you are substracting 7 days to the min date selected and another 7 to the max selected, meaning the previous seven days. Is that OK?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 May 2013 10:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408659#M484141</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2013-05-26T10:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis previous week</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408660#M484142</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;Actually both of the suggestions worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 May 2013 10:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-previous-week/m-p/408660#M484142</guid>
      <dc:creator />
      <dc:date>2013-05-26T10:28:57Z</dc:date>
    </item>
  </channel>
</rss>

