<?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: Comparing two rows data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699789#M252620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the above() function get a value from the previous row in a table.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If (Sum(price)&amp;gt;above(Sum(price)), RBG(0,128,0),RGB(255,0,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Oct 2014 10:03:28 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-10-27T10:03:28Z</dc:date>
    <item>
      <title>Comparing two rows data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699788#M252619</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;in a straight table I'd like to compare a row data with its year-previuos data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tha table contains a Year and an amount: the amount is calculates as Sum (prices).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to set the amount cells foreground color as red if the data of one year are less then the previous year ones, so I need a formula to set the background cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (Sum(price)&amp;gt;Sum( &amp;lt;????&amp;gt; price), RBG(0,128,0),RGB(255,0,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should anybody help me to set the right formula?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 09:51:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699788#M252619</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-27T09:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two rows data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699789#M252620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the above() function get a value from the previous row in a table.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If (Sum(price)&amp;gt;above(Sum(price)), RBG(0,128,0),RGB(255,0,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 10:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699789#M252620</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-10-27T10:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two rows data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699790#M252621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like below in the expression for background color:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(price) &amp;gt; above(aggr(sum(price),Year)),RGB(0,128,0),RGB(255,0,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 10:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699790#M252621</guid>
      <dc:creator />
      <dc:date>2014-10-27T10:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two rows data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699791#M252622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry...i can't mark both your answers as "right answer", so i chose the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you to everybody &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 10:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699791#M252622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-27T10:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two rows data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699792#M252623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You chose the right one as correct. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;Gysbert Wassenaar&lt;/A&gt;.. is from whom I am learning &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 11:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-rows-data/m-p/699792#M252623</guid>
      <dc:creator />
      <dc:date>2014-10-27T11:18:22Z</dc:date>
    </item>
  </channel>
</rss>

