<?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 Linking period to a value column via a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303057#M112139</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;This problem is vexing me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of history values and a table of current values.&lt;/P&gt;&lt;P&gt;These values are linked to a period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have a table / chart which includes the period &amp;amp; the current amount as at that period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've set up a variable which tells the dashboard which column of data to return, and this works perfectly for individual periods, or any number of historical periods.&lt;/P&gt;&lt;P&gt;However when selecting the 'current' period along with any other period, the data isn't returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sort of understand why this doesn't work (the variable can return only one answer) but I thought the variable might calculate for each period individually... I think I just need to tweak it a little but I can't figure it out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its kind of hard to explain in words so have put together this example!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially the outcome I want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALL periods&amp;nbsp;&amp;nbsp; sum(CUR_AMOUNT) as at that period....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2012 15:58:15 GMT</pubDate>
    <dc:creator>adamdavi3s</dc:creator>
    <dc:date>2012-01-24T15:58:15Z</dc:date>
    <item>
      <title>Linking period to a value column via a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303057#M112139</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;This problem is vexing me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of history values and a table of current values.&lt;/P&gt;&lt;P&gt;These values are linked to a period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have a table / chart which includes the period &amp;amp; the current amount as at that period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've set up a variable which tells the dashboard which column of data to return, and this works perfectly for individual periods, or any number of historical periods.&lt;/P&gt;&lt;P&gt;However when selecting the 'current' period along with any other period, the data isn't returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sort of understand why this doesn't work (the variable can return only one answer) but I thought the variable might calculate for each period individually... I think I just need to tweak it a little but I can't figure it out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its kind of hard to explain in words so have put together this example!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially the outcome I want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALL periods&amp;nbsp;&amp;nbsp; sum(CUR_AMOUNT) as at that period....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 15:58:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303057#M112139</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2012-01-24T15:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Linking period to a value column via a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303058#M112140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just change the variable definition to a non evaluated version (removing the equal sign and the single quotes):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(%PERIOD=vcurrent_period,CUR_CUR_AMOUNT,HIST_CUR_AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you could also concatenate all fact data into one table and just flag the historical data as such, that might be an idea, also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 16:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303058#M112140</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-24T16:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Linking period to a value column via a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303059#M112141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;You know I did&amp;nbsp; try that, what I totally failed to do (and I have tried about 20 different formula for this!) was simply remove the ' from around the field names in the IF statement.... I knew it had to be something simple!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also pondered loading everything into one table but the issue I had was around the YTD figures (As these obviously by their nature can not be summed), however I didn't think of the historical flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have a play thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 20:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-period-to-a-value-column-via-a-variable/m-p/303059#M112141</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2012-01-24T20:23:14Z</dc:date>
    </item>
  </channel>
</rss>

