<?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: Using a variable value to pull another field value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671747#M244018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a list box or variable you could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Addmonths(Date, -12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the date from last year based on your selected date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 15:22:34 GMT</pubDate>
    <dc:creator>jpapador</dc:creator>
    <dc:date>2014-10-21T15:22:34Z</dc:date>
    <item>
      <title>Using a variable value to pull another field value</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671745#M244016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I select an date in my calendar I store the value into a variable.&amp;nbsp; I want to use that variable value to pull a field value from my mastercalendar table which will give me the corresponding last year date.&amp;nbsp; Example:&lt;/P&gt;&lt;P&gt;mastercalendar:&amp;nbsp; 'Date' = 7/12/2014 ,&amp;nbsp; 'LY Date' = 7/12/2013.&amp;nbsp; In my app, I have a calendar object.&amp;nbsp; I select 7/12/2014 and that value is stored in my variable.&amp;nbsp; I want to use the variable to look in the mastercalendar table to get the LY Date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671745#M244016</guid>
      <dc:creator />
      <dc:date>2014-10-21T14:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable value to pull another field value</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671746#M244017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the expression u can use this to get the LYYear&lt;/P&gt;&lt;P&gt;Only(&amp;lt;Date={'=$(vSelectedDate)'}&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px;"&gt;LY Date&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 15:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671746#M244017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-21T15:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable value to pull another field value</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671747#M244018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a list box or variable you could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Addmonths(Date, -12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the date from last year based on your selected date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 15:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671747#M244018</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2014-10-21T15:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable value to pull another field value</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671748#M244019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a way to make it even more dynamic.&lt;/P&gt;&lt;P&gt;I build an island that looks like this:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="background: white; border: outset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: inset silver 1.0pt; background: whitesmoke; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;%Unit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: inset silver 1.0pt; background: whitesmoke; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CurrentUnit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: inset silver 1.0pt; background: whitesmoke; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LastUnit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: inset silver 1.0pt; background: whitesmoke; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P align="center" style="margin-bottom: .0001pt; text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PriorUnit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PY&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CQ&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LQ&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PQ&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;Week&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CW&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LW&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PW&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;CD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;LD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: inset silver 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Times New Roman','serif'; color: #363636;"&gt;PD&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make a list box with %Unit and make sure always one is selected.&lt;/P&gt;&lt;P&gt;Now I can have an expression that compares one period to the next while allowing the user to pick the period to compare:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use two variables:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;vCurPeriodSet is defined as the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;=only&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;CurrentUnit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;This returns CY if year is selected or CW if Week is selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;vLastPeriodSet is defined as the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: maroon;"&gt;LastUnit&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of how it could be used in an expression:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vCurPeriodSet)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={1}&amp;gt;}SumValue)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; This gives a value for the current period selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Sum({$&amp;lt;$(vLastPeriodSet)={1}&amp;gt;}somevalue) returns the value from the prior period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;For the example provided, I used flags in my calendar that were built using the inYear(),inMonth() functions.&amp;nbsp; The calendar will obviously need the all the fields listed in the island you create.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 15:48:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-value-to-pull-another-field-value/m-p/671748#M244019</guid>
      <dc:creator>wms_manis</dc:creator>
      <dc:date>2014-10-21T15:48:15Z</dc:date>
    </item>
  </channel>
</rss>

