<?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 Calculation within Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054080#M919655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry. I've been out of action for awhile.&amp;nbsp; I will try create some dummy data in Excel as soon as I can. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2016 17:58:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-11T17:58:11Z</dc:date>
    <item>
      <title>Date Calculation within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054076#M919651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to Qlikview and have been trying to get to my objective through a series of steps.&amp;nbsp; I am trying to get a survey count from 2 weeks prior to the current date.&amp;nbsp; I hard coded values and I get an accurate result.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This Works:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =sum({$&amp;lt;WeekNum={"$(=17-2)"}&amp;gt;}[SurveyResp])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;This Works:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Week(Today())-2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason substituting (2) into (1) for the "17" into the Set Analysis statement gives me problems.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Doesn't Work:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=sum({$&amp;lt;WeekNum={"$(=Week(Today())-2)"}&amp;gt;}[SurveyResp])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have been trying for a long time now and have had no success. I assume functions can't be stated the same for them to evaluate in Set Analysis?&lt;BR /&gt;&lt;/SPAN&gt;&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-Calculation-within-Set-Analysis/m-p/1054076#M919651</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054077#M919652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about 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;&lt;STRONG&gt;=Sum({$&amp;lt;WeekNum={"$(=&lt;SPAN style="color: #ff0000;"&gt;Num#(&lt;/SPAN&gt;Week(Today())-2&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;)"}&amp;gt;}[SurveyResp])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 16:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054077#M919652</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-02T16:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054078#M919653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny T,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&amp;nbsp; At one time I tried using Num# function as a wrapper but I kept getting a value of 0. So there is still something tricky to transform (= ## -2) is quite tricky to transform even though standalone the function returns the correct value for ##.&amp;nbsp; This appears to be more than a return datatype issue. I haven't tried it but maybe I need to set the week calc into a variable first then substitute it into the set analysis statement. Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 16:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054078#M919653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-03T16:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054079#M919654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a sample you are able to share?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2016 16:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054079#M919654</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-03T16:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation within Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054080#M919655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry. I've been out of action for awhile.&amp;nbsp; I will try create some dummy data in Excel as soon as I can. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-within-Set-Analysis/m-p/1054080#M919655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T17:58:11Z</dc:date>
    </item>
  </channel>
</rss>

