<?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 Set variable wtih specific value in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353217#M884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, let me try once more a different way, since I realize I am probably not making sense.&amp;nbsp; Consider this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="5-15-2012 5-13-13 PM.png" class="jive-image-thumbnail jive-image" height="107" onclick="" src="https://community.qlik.com/legacyfs/online/14296_5-15-2012+5-13-13+PM.png" width="520" /&gt;&lt;/P&gt;&lt;P&gt;Basically I want to retrieve that value in bold, the WTD amount where the date is the last day of the week (according to the Week_End_Date).&amp;nbsp; I am using set analysis like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Week_Of_Year={$(vCurrentWeek)}, Year = {$(vCurrentYear)} &amp;gt;} wtd_amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I'm missing is something to say Date = "1/26/2012", or Date = Week_End_Date.&amp;nbsp; Hope that helps, and thanks for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 21:17:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-15T21:17:14Z</dc:date>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353210#M877</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;This might be much simpler than i'm making it out to be, but is there a way to set a variable to a value based on another field value?&amp;nbsp; For example, I have a Week Number variable set to 5, hard-coded, and I want to set a Week End Date variable from the table where Week Number = 5.&amp;nbsp; Basically look up this value in a table according to this other value and store the result in a variable.&amp;nbsp; There would always be one value returned from this lookup.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 20:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353210#M877</guid>
      <dc:creator />
      <dc:date>2012-05-15T20:09:53Z</dc:date>
    </item>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353211#M878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like to say: potentially yes, but maybe I misunderstood your requirement.&lt;/P&gt;&lt;P&gt;Ok, you have a week number variable set to 5, but how does you other table look like (what's the structure)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give a short example together with the desired outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 20:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353211#M878</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-15T20:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353212#M879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just use lookup():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vWeekEndDate = lookup('WeekEndDateField', 'WeekNumberField', $(vWeekNumber));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 20:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353212#M879</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2012-05-15T20:30:46Z</dc:date>
    </item>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353213#M880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would this function respect any filters that have been added?&amp;nbsp; For example, my WeekNumberField may be 5, but there may also be a filter on year 2012.&amp;nbsp; So in that case I'd want the WeekEndDate to be 2/2/2012, not 2/3/2011.&amp;nbsp; Ideally I'd want something similar to set analysis, where i can define a number of filters and it would return the value for a field where those conditions are met.&amp;nbsp; Or in sql the selection of a field with a multi-part where clause.&amp;nbsp; I think lookup() is close though...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 20:58:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353213#M880</guid>
      <dc:creator />
      <dc:date>2012-05-15T20:58:05Z</dc:date>
    </item>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353214#M881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean with "any filters"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353214#M881</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2012-05-15T21:01:11Z</dc:date>
    </item>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353215#M882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Meaning if there is a filter selection on Year, would the lookup respect that?&amp;nbsp; In the above example, there would be two valid Week_End_Dates for Week_Number 5:&amp;nbsp; 2/3/2012 and 2/2/2011 (one for 2012 and one for 2011).&amp;nbsp; But if they have a filter on 2012 only, i would want 2/3/2012 to be returned. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353215#M882</guid>
      <dc:creator />
      <dc:date>2012-05-15T21:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353216#M883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't understand your approach at all. Maybe you can use set analysis. Inter record functions like lookup() will only work in script...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353216#M883</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2012-05-15T21:08:42Z</dc:date>
    </item>
    <item>
      <title>Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353217#M884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, let me try once more a different way, since I realize I am probably not making sense.&amp;nbsp; Consider this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="5-15-2012 5-13-13 PM.png" class="jive-image-thumbnail jive-image" height="107" onclick="" src="https://community.qlik.com/legacyfs/online/14296_5-15-2012+5-13-13+PM.png" width="520" /&gt;&lt;/P&gt;&lt;P&gt;Basically I want to retrieve that value in bold, the WTD amount where the date is the last day of the week (according to the Week_End_Date).&amp;nbsp; I am using set analysis like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Week_Of_Year={$(vCurrentWeek)}, Year = {$(vCurrentYear)} &amp;gt;} wtd_amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I'm missing is something to say Date = "1/26/2012", or Date = Week_End_Date.&amp;nbsp; Hope that helps, and thanks for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353217#M884</guid>
      <dc:creator />
      <dc:date>2012-05-15T21:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable wtih specific value</title>
      <link>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353218#M885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I got it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Date = P({1&amp;lt;Week_Of_Year={$(vCurrentWeek)}, Year = {$(vCurrentYear)}&amp;gt;} Week_End_Date ) &amp;gt; } wtd_net_revenue_amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it returns all the possible Week_End_Date's for the specificed Week_Of_Year and Year (which is only one, 1/26/2012), and sets the Date equal to that value.&amp;nbsp; Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/Set-variable-wtih-specific-value/m-p/353218#M885</guid>
      <dc:creator />
      <dc:date>2012-05-15T21:41:19Z</dc:date>
    </item>
  </channel>
</rss>

