<?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: Variable / set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661687#M674795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$1 - is not really past week. It actually represents the &lt;STRONG&gt;earlier selection. &lt;/STRONG&gt;To get past week , you should probably use -&amp;nbsp; $(=vTodayWeek-1)&amp;nbsp;&amp;nbsp; // without dollar sign&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2014 06:32:24 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2014-08-12T06:32:24Z</dc:date>
    <item>
      <title>Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661685#M674793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I need some help to understand something with my variable and how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two variables one to set the week and one to to set month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variables are defined in the script and looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vTodayWeek = week(Today());&lt;/P&gt;&lt;P&gt;let vTodayMonth = Month(Today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Variable Overview i get 33 and aug&amp;nbsp; as my week and month. So it seems to work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then here comes the challange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then want to create a new variable to display data for the current week and month and in some cases for the past week and past month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the week I have done like this and it works like I want it to, I can now just adjust the 0 to a 1 and get the past week :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))},Uke={$(=vTodayWeek-$1)},Team={'$2'}&amp;gt;}SCORE_SP1)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))},Uke={$(=vTodayWeek-$1)},Team={'$2'}&amp;gt;}Teller)/100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my expression looks like this: =num($(vExprKTIValueTeamWeek1(0,REK TEAM)),'#,##0.0%')&amp;nbsp; (current week)&lt;/P&gt;&lt;P&gt;num($(vExprKTIValueTeamWeek1(1,REK TEAM)),'#,##0.0%')&amp;nbsp; (past week)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***For month on the other hand, I can't make it work,****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))},Uke={$(=vTodayMonth-$1)},Team={'$2'}&amp;gt;}SCORE_SP1)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))},Uke={$(=vTodayMonth-$1)},Team={'$2'}&amp;gt;}Teller)/100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my expressions looks like this: =num($(vExprKTIValueTeamMonth(0,REK TEAM)),'#,##0.0%') (should be current month)&lt;/P&gt;&lt;P&gt;=num($(vExprKTIValueTeamMonth(1,REK TEAM)),'#,##0.0%') (should be past month)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong with the month? And what must I do to correct it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 06:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661685#M674793</guid>
      <dc:creator />
      <dc:date>2014-08-12T06:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661686#M674794</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;Have a look at below post.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 06:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661686#M674794</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-08-12T06:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661687#M674795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$1 - is not really past week. It actually represents the &lt;STRONG&gt;earlier selection. &lt;/STRONG&gt;To get past week , you should probably use -&amp;nbsp; $(=vTodayWeek-1)&amp;nbsp;&amp;nbsp; // without dollar sign&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 06:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661687#M674795</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-12T06:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661688#M674796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The $1 is there to enable me to set the - parameter in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, Expression in variable overview:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År={$(=max(År)-$1)},Segment={'$2'}&amp;gt;}[TO Answered Calls Within SL]*SlFlag)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År={$(=max(År)-$1)},Segment={'$2'}&amp;gt;}[TO Answered Calls])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vExprSLSegmentLight(0,B2B))&amp;nbsp;&amp;nbsp; = 2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vExprSLSegmentLight(1,B2B))&amp;nbsp; = 2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You see?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: År = Year in Norwegian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 06:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661688#M674796</guid>
      <dc:creator />
      <dc:date>2014-08-12T06:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661689#M674797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would be an interesting one. Could you post your sample qvw?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 06:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661689#M674797</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-12T06:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661690#M674798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link removed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;had to remove some stuff from the load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 08:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661690#M674798</guid>
      <dc:creator />
      <dc:date>2014-08-12T08:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Variable / set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661691#M674799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have found the solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script I still keep, let vTodayMonth = month(today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in Variable Overview i use this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))}, Måned = {"$(=month(makedate(1,vTodayMonth - $1)))"}, Team = {'$2'}&amp;gt;}SCORE_SP1) &lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;År = {$(=max(År))}, Måned = {"$(=month(makedate(1,vTodayMonth - $1)))"}, Team = {'$2'}&amp;gt;}Teller)/100 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the graph i can now use $(vExprKTIValueTeamMonth(0,BEDRIFT 2))&amp;nbsp; to set the value for this month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And&amp;nbsp; $(vExprKTIValueTeamMonth(1,BEDRIFT 2)) for past month. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 08:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-set-analysis/m-p/661691#M674799</guid>
      <dc:creator />
      <dc:date>2014-08-14T08:32:08Z</dc:date>
    </item>
  </channel>
</rss>

