<?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 how to use dimension field in above function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-use-dimension-field-in-above-function/m-p/512688#M191570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a straight table which has two dimension, one is year quarter which values are like 2011Q1, 2011Q2 etc and second dimension is product type like Prod_1 and Prod_2.&lt;/P&gt;&lt;P&gt;Now what I want to show is the for each year quarter, for each product what is the sum of production for last 4 quarters.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If I am calculating for year quarter 2012Q4, then I need to take sum of 2012Q4, 2011Q4, 2011Q3, 2011Q2 for both products. So the output will be like this:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="202"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="77"&gt;YearQuarter&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="69"&gt;Prod_Type&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="56"&gt;Quantity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2012Q4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2012Q4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;102&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;103&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;104&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;105&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here this is a sample data for understanding. So for yearquarter 2012Q4 and for product type Prod_1, the quantity is sum of previous three yearquarter and current yearquarter ( 2012Q4 + 2012Q3 + 2012Q2 + 2012Q1). So in expression, I am using below formula&lt;/P&gt;&lt;P&gt;Sum (Quantity)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity), 1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity),2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity),3)&lt;/P&gt;&lt;P&gt;But this is not working because as per my understanding, we have two dimensions and here above function is getting confused which dimension to take. When I am removing prod type dimension, it is working.&lt;/P&gt;&lt;P&gt;Please guide me is resolving this issue. Do we have any other way to resolve this issue?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Oct 2013 13:58:24 GMT</pubDate>
    <dc:creator>musketeers</dc:creator>
    <dc:date>2013-10-23T13:58:24Z</dc:date>
    <item>
      <title>how to use dimension field in above function</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-dimension-field-in-above-function/m-p/512688#M191570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a straight table which has two dimension, one is year quarter which values are like 2011Q1, 2011Q2 etc and second dimension is product type like Prod_1 and Prod_2.&lt;/P&gt;&lt;P&gt;Now what I want to show is the for each year quarter, for each product what is the sum of production for last 4 quarters.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If I am calculating for year quarter 2012Q4, then I need to take sum of 2012Q4, 2011Q4, 2011Q3, 2011Q2 for both products. So the output will be like this:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="202"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="77"&gt;YearQuarter&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="69"&gt;Prod_Type&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="56"&gt;Quantity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2012Q4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2012Q4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;102&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;103&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;104&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;2013Q2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Prod_2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;105&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here this is a sample data for understanding. So for yearquarter 2012Q4 and for product type Prod_1, the quantity is sum of previous three yearquarter and current yearquarter ( 2012Q4 + 2012Q3 + 2012Q2 + 2012Q1). So in expression, I am using below formula&lt;/P&gt;&lt;P&gt;Sum (Quantity)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity), 1)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity),2)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Above(Sum (Quantity),3)&lt;/P&gt;&lt;P&gt;But this is not working because as per my understanding, we have two dimensions and here above function is getting confused which dimension to take. When I am removing prod type dimension, it is working.&lt;/P&gt;&lt;P&gt;Please guide me is resolving this issue. Do we have any other way to resolve this issue?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Oct 2013 13:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-dimension-field-in-above-function/m-p/512688#M191570</guid>
      <dc:creator>musketeers</dc:creator>
      <dc:date>2013-10-23T13:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to use dimension field in above function</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-dimension-field-in-above-function/m-p/512689#M191571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 12:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-dimension-field-in-above-function/m-p/512689#M191571</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2013-10-24T12:09:25Z</dc:date>
    </item>
  </channel>
</rss>

