<?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 Use dimension value in expression and as dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-dimension-value-in-expression-and-as-dimension/m-p/1562963#M441453</link>
    <description>&lt;P&gt;I want to make a forecast based on sales and prospects previous three years and the prospects of coming year.&lt;/P&gt;&lt;P&gt;year is a field in my table&lt;/P&gt;&lt;P&gt;I my chart I want to show the sales of the last three years and the forecasted year in columns&lt;/P&gt;&lt;P&gt;I have variables for years , v_Year,v_Year-1,v_Year-2, v_Year-3&lt;/P&gt;&lt;P&gt;In my expression I have :&lt;/P&gt;&lt;P&gt;If(year &amp;lt; $(v_Year), sum(sales),&lt;/P&gt;&lt;P&gt;sum({year=$(v_year)}prospect)&lt;/P&gt;&lt;P&gt;/(sum({year=$(v_year-1)}prospect)+ sum({year=$(v_year-2)}prospect)+sum({year=$(v_year-3)}prospect)&lt;/P&gt;&lt;P&gt;*(sum({year=$(v_year-1)}sales)+ sum({year=$(v_year-2)}sales)+sum({year=$(v_year-3)}sales)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;However I do not get any values for the coming year. Can I use the year value as a dimension and in the expression at the same time ?&lt;/P&gt;&lt;P&gt;I know that in this example the expression could be simplified, but because I have more conditions in the original expression I have to do it this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 14:35:55 GMT</pubDate>
    <dc:creator>curiousfellow</dc:creator>
    <dc:date>2019-03-29T14:35:55Z</dc:date>
    <item>
      <title>Use dimension value in expression and as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Use-dimension-value-in-expression-and-as-dimension/m-p/1562963#M441453</link>
      <description>&lt;P&gt;I want to make a forecast based on sales and prospects previous three years and the prospects of coming year.&lt;/P&gt;&lt;P&gt;year is a field in my table&lt;/P&gt;&lt;P&gt;I my chart I want to show the sales of the last three years and the forecasted year in columns&lt;/P&gt;&lt;P&gt;I have variables for years , v_Year,v_Year-1,v_Year-2, v_Year-3&lt;/P&gt;&lt;P&gt;In my expression I have :&lt;/P&gt;&lt;P&gt;If(year &amp;lt; $(v_Year), sum(sales),&lt;/P&gt;&lt;P&gt;sum({year=$(v_year)}prospect)&lt;/P&gt;&lt;P&gt;/(sum({year=$(v_year-1)}prospect)+ sum({year=$(v_year-2)}prospect)+sum({year=$(v_year-3)}prospect)&lt;/P&gt;&lt;P&gt;*(sum({year=$(v_year-1)}sales)+ sum({year=$(v_year-2)}sales)+sum({year=$(v_year-3)}sales)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;However I do not get any values for the coming year. Can I use the year value as a dimension and in the expression at the same time ?&lt;/P&gt;&lt;P&gt;I know that in this example the expression could be simplified, but because I have more conditions in the original expression I have to do it this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 14:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-dimension-value-in-expression-and-as-dimension/m-p/1562963#M441453</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2019-03-29T14:35:55Z</dc:date>
    </item>
  </channel>
</rss>

