<?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 Previuos quarters comparision in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230567#M82381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;The if condition is showing error in expression.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Oct 2010 08:48:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-26T08:48:10Z</dc:date>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230561#M82375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have a excel sheet like this&lt;/P&gt;&lt;P&gt;Yr/ Qtr Product Qty&lt;BR /&gt;200901 LAPTOP 2500&lt;BR /&gt;200901 LCD TV 4500&lt;BR /&gt;200901 WASHING MACHINE 1250&lt;BR /&gt;200901 REFRIGERATOR 5400&lt;BR /&gt;200902 LAPTOP 5600&lt;BR /&gt;200902 LCD TV 1248&lt;BR /&gt;200902 WASHING MACHINE 8760&lt;BR /&gt;200902 REFRIGERATOR 4322&lt;BR /&gt;200903 LAPTOP 8520&lt;BR /&gt;200903 LCD TV 5341&lt;BR /&gt;200903 WASHING MACHINE 9870&lt;BR /&gt;200903 REFRIGERATOR 4320&lt;BR /&gt;200904 LAPTOP 1321&lt;BR /&gt;200904 LCD TV 6534&lt;BR /&gt;200904 WASHING MACHINE 1234&lt;BR /&gt;200904 REFRIGERATOR 7654&lt;/P&gt;&lt;P&gt;I am creating one dashboard with the above data, in the dashboard I am going to add one more field with the green and red images.&lt;/P&gt;&lt;P&gt;If I compare between the quarters for any product I should have either red or green image.&lt;/P&gt;&lt;P&gt;ex:&lt;BR /&gt;Yr/ Qtr Product Qty Image&lt;BR /&gt;200901 LAPTOP 2500 --&lt;BR /&gt;200902 LAPTOP 5600 Gree Up Image (because if I compare with the previous quarter of the qty is more. (5600&amp;gt;2500)&lt;BR /&gt;200903 LAPTOP 8520 -- Gree Up Image (because if I compare with the previous quarter of the qty is more. (8520&amp;gt;5600)&lt;BR /&gt;200904 LAPTOP 1321 -- RED down Image (because if I compare with the previous quarter of the qty is less. (1321&amp;lt;8520)&lt;/P&gt;&lt;P&gt;Finally my dashboard looks like this&lt;BR /&gt;Yr/ Qtr Product Qty Image&lt;BR /&gt;200901 LAPTOP 2500 --&lt;BR /&gt;200901 LCD TV 4500 --&lt;BR /&gt;200901 WASHING MACHINE 1250 --&lt;BR /&gt;200901 REFRIGERATOR 5400 --&lt;BR /&gt;200902 LAPTOP 5600 green&lt;BR /&gt;200902 LCD TV 1248 red&lt;BR /&gt;200902 WASHING MACHINE 8760 green&lt;BR /&gt;200902 REFRIGERATOR 4322 red&lt;BR /&gt;200903 LAPTOP 8520 green&lt;BR /&gt;200903 LCD TV 5341 green&lt;BR /&gt;200903 WASHING MACHINE 9870 green&lt;BR /&gt;200903 REFRIGERATOR 4320 red&lt;BR /&gt;200904 LAPTOP 1321 red&lt;BR /&gt;200904 LCD TV 6534 green&lt;BR /&gt;200904 WASHING MACHINE 1234 red&lt;BR /&gt;200904 REFRIGERATOR 7654 green&lt;/P&gt;&lt;P&gt;I tried so many ways to compare with the previous quarter, but no luck.&lt;/P&gt;&lt;P&gt;Pls let me know if any one have idea on the same.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Oct 2010 06:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230561#M82375</guid>
      <dc:creator />
      <dc:date>2010-10-07T06:26:54Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230562#M82376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;any inputs on these query???&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Oct 2010 09:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230562#M82376</guid>
      <dc:creator />
      <dc:date>2010-10-08T09:56:03Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230563#M82377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if this is really the lowest level of detail for your data, you could just sort by Product then Yr/Qtr, and add a new field:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if(Product=previous(Product),previous(Qty)) as PreviousQty&lt;/P&gt;&lt;P&gt;That's not what I usually recommend. I usually recommend an AsOf table to tie an AsOfQuarter to the current quarter with a 'Current' type, and the previous quarter with a 'Previous' type. But when your data is this simple, there seems no reason to go to that sort of complexity.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Oct 2010 00:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230563#M82377</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-10-09T00:54:32Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230564#M82378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Not getting exactly what your suggesting.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 08:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230564#M82378</guid>
      <dc:creator />
      <dc:date>2010-10-22T08:14:08Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230565#M82379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;Can you pls guide me.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 07:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230565#M82379</guid>
      <dc:creator />
      <dc:date>2010-10-26T07:33:53Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230566#M82380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tims,&lt;/P&gt;&lt;P&gt;You can try the following code. In which, the source of TempSales is your table or excell sheet. The required output would be recieved by Sales Table.&lt;/P&gt;&lt;P&gt;TempSales:&lt;BR /&gt;LOAD Left(YrQtr, 4) AS Year,&lt;BR /&gt; Right(YrQty, 2) AS Qtr,&lt;BR /&gt; Product,&lt;BR /&gt; Sum(Qty) AS Qty&lt;BR /&gt;FROM TABLE&lt;BR /&gt;GROUP BY Left(YrQtr, 4), Right(YrQty, 2), Product&lt;BR /&gt;ORDER BY Left(YrQtr, 4), Right(YrQty, 2), Product;&lt;/P&gt;&lt;P&gt;Sales:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD Year,&lt;BR /&gt; Qtr,&lt;BR /&gt; Product,&lt;BR /&gt; Qty,&lt;BR /&gt; if( (Product=previous(Product) AND (previous(Qty) &amp;gt; Qty), 'Green',&lt;BR /&gt; if( (Product=previous(Product) AND (previous(Qty) &amp;lt; Qty), 'Red'&lt;BR /&gt; )) AS Image&lt;BR /&gt;RESIDENT TempSales;&lt;/P&gt;&lt;P&gt;Drop Table TempSales;&lt;/P&gt;&lt;P&gt;Hope, it would be helpful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj Kishor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 07:52:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230566#M82380</guid>
      <dc:creator />
      <dc:date>2010-10-26T07:52:44Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230567#M82381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raj,&lt;/P&gt;&lt;P&gt;The if condition is showing error in expression.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 08:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230567#M82381</guid>
      <dc:creator />
      <dc:date>2010-10-26T08:48:10Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230568#M82382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I used Previous function in the expression tab its not working.&lt;/P&gt;&lt;P&gt;may I know what it makes difference between script and expression tab.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 13:01:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230568#M82382</guid>
      <dc:creator />
      <dc:date>2010-10-26T13:01:55Z</dc:date>
    </item>
    <item>
      <title>Previuos quarters comparision</title>
      <link>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230569#M82383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;tims_qlikview wrote: If I used Previous function in the expression tab its not working.&lt;BR /&gt;may I know what it makes difference between script and expression tab.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Script is script and charts are charts. Some functions can be used in one, some in the other, and some in both. Previous() is not used in charts because it is referring to the previously-read input record from your data source that was not discarded by a where statement. Charts aren't reading data from data sources. Above() can sometimes serve a similar purpose in a chart, but it's not at all the same thing.&lt;/P&gt;&lt;P&gt;In this case, the general categories are "inter record functions" (used in script) and "chart inter record functions" (used in charts).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 20:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previuos-quarters-comparision/m-p/230569#M82383</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-10-26T20:03:16Z</dc:date>
    </item>
  </channel>
</rss>

