<?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 with variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702455#M253479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;Also try using variable in the set analysis like this:&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: 13.3333330154419px;"&gt;&lt;BR /&gt;&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: 13.3333330154419px;"&gt;Sum({&amp;lt;[# of Weeks from Current Week] ={&lt;STRONG&gt;'-($(=$(i)))'&lt;/STRONG&gt;}&amp;gt;}[EngagementsTW#])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 17:53:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-03T17:53:56Z</dc:date>
    <item>
      <title>Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702453#M253477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to change a set analysis to read from a variable instead of a static value. The issue is the Dashboard contains only formulas related to dates. When the data source fails to update thus the data is from more than 1 week back, my Dashboard becomes blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;FROM:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;set EngCurrentWeek = Sum({&amp;lt;[# of Weeks from Current Week] ={'-1'}&amp;gt;}[EngagementsTW#])&lt;/P&gt;&lt;P&gt;SET EngPreviousWeek = Sum({&amp;lt;[# of Weeks from Current Week] ={'-2'}&amp;gt;}[EngagementsTW#])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;TO:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//Find Max Date on QVD&lt;/P&gt;&lt;P&gt;Set vMaxWeek = week($(vMaxDate));&lt;/P&gt;&lt;P&gt;Set vCurrentWeek = Week(Today());&lt;/P&gt;&lt;P&gt;Set i = $(vCurrentWeek) - $(vMaxWeek);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set EngCurrentWeek = Sum({&amp;lt;[# of Weeks from Current Week] ={'-($(i))'}&amp;gt;}[EngagementsTW#])&lt;/P&gt;&lt;P&gt;SET EngPreviousWeek = Sum({&amp;lt;[# of Weeks from Current Week] ={'-($(i)-1)'}&amp;gt;}[EngagementsTW#])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new formulas with the variables are not working. How can the set analysis use the variables? Is this a formatting issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 16:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702453#M253477</guid>
      <dc:creator />
      <dc:date>2014-09-03T16:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702454#M253478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using 'let' instead of 'set' to define your variables: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let vMaxWeek = week($(vMaxDate));&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let vCurrentWeek = Week(Today());&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let i = $(vCurrentWeek) - $(vMaxWeek);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 17:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702454#M253478</guid>
      <dc:creator>gmoraleswit</dc:creator>
      <dc:date>2014-09-03T17:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702455#M253479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;Also try using variable in the set analysis like this:&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: 13.3333330154419px;"&gt;&lt;BR /&gt;&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: 13.3333330154419px;"&gt;Sum({&amp;lt;[# of Weeks from Current Week] ={&lt;STRONG&gt;'-($(=$(i)))'&lt;/STRONG&gt;}&amp;gt;}[EngagementsTW#])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 17:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702455#M253479</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T17:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702456#M253480</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;"SET" works when we need constant values (we can say hard code) and "LET" is used to define variable values from a formula, LET can use funtions like today(), week(), Peek() ... just change SET by LET (as Gabriela said) and you can see funtions week() turns blue and variables $() turns gray.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 18:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-variables/m-p/702456#M253480</guid>
      <dc:creator />
      <dc:date>2014-09-03T18:06:51Z</dc:date>
    </item>
  </channel>
</rss>

