<?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: Nested if condition in expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666823#M1053253</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;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Actually want to calculate the sum for the currently selected year - previous year . like if I select year 2009, then it should calculate for sales of 2009 - sales of 2008 or vice versa. Believe max won't work the way I want..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 06:53:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-21T06:53:08Z</dc:date>
    <item>
      <title>Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666820#M1053250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;I am trying to accomplish a nested if condition to an expression but i am not able to successfully implement it. I am comparing a sales trend, and my expression is given below,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;if(((Sum({$&amp;lt;Year = {$(=Only(Year ))}&amp;gt;}[Net Sales])) - (Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year)-1)}&amp;gt;}[Net Sales]))) = 0,'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_e_y.png', if(((Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year ))}&amp;gt;}[Net Sales])) - (Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year )-1)}&amp;gt;}[Net Sales]))) &amp;gt; 0,'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png','qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;I am trying to implement image to this expression. characters starting with "gmem" are nothing but the link to images. If I use a single if condition, it works perfectly fine. But if I want to have three possibilities (using 2 if conditions), then it is not working. Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Sivacharan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:14:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666820#M1053250</guid>
      <dc:creator />
      <dc:date>2014-10-21T06:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666821#M1053251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps a parenthesis issue. Put one more closing parenthesis at the end and try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666821#M1053251</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-10-21T06:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666822#M1053252</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;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: calibri, verdana, arial, sans-serif; color: #ff6600;"&gt;if(Sum({$&amp;lt;Year = {$(=Max(Year))}&amp;gt;}[Net Sales]) - Sum({$&amp;lt;Year&amp;nbsp; = {$(=&lt;STRONG style="font-family: calibri, verdana, arial, sans-serif; color: #ff6600;"&gt;Max&lt;/STRONG&gt;(Year)-1)}&amp;gt;}[Net Sales]) =&amp;nbsp; 0, 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_e_y.png', &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: calibri, verdana, arial, sans-serif; color: #ff6600;"&gt;if(Sum({$&amp;lt;Year&amp;nbsp; = {$(=&lt;STRONG style="font-family: calibri, verdana, arial, sans-serif; color: #ff6600;"&gt;Max&lt;/STRONG&gt;(Year ))}&amp;gt;}[Net Sales]) - Sum({$&amp;lt;Year&amp;nbsp; = {$(=&lt;STRONG style="font-family: calibri, verdana, arial, sans-serif; color: #ff6600;"&gt;Max&lt;/STRONG&gt;(Year)-1)}&amp;gt;}[Net Sales]) &amp;gt; 0, 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png','qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:21:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666822#M1053252</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-10-21T06:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666823#M1053253</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;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Actually want to calculate the sum for the currently selected year - previous year . like if I select year 2009, then it should calculate for sales of 2009 - sales of 2008 or vice versa. Believe max won't work the way I want..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666823#M1053253</guid>
      <dc:creator />
      <dc:date>2014-10-21T06:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666824#M1053254</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;I you select &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;2009, then Max(Year) is 2009 and Max(Year) -1 is 2008, this is what I am doing, if you do not give Max() and use Only(), you will get null value when no year is selected.&amp;nbsp; That is why I used Max(), if Year is always selected one then you can use Only().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Is above expression working?&amp;nbsp; Did you checked?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 07:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666824#M1053254</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-10-21T07:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666825#M1053255</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;I would suggest to use the following expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=PICK(SIGN(SUM({$&amp;lt;Year = {$(=Max(Year))}&amp;gt;}[Net Sales]) - SUM({$&amp;lt;Year&amp;nbsp; = {$(=Max(Year)-1)}&amp;gt;}[Net Sales])) + 2, 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png', 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_e_y.png', 'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 11:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666825#M1053255</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2014-10-21T11:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666826#M1053256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(Sum({$&amp;lt;Year = {$(=Only(Year ))}&amp;gt;}[Net Sales]) - Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year)-1)}&amp;gt;}[Net Sales]) = 0,'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_e_y.png', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year ))}&amp;gt;}[Net Sales]) - Sum({$&amp;lt;Year&amp;nbsp; = {$(=Only(Year )-1)}&amp;gt;}[Net Sales]) &amp;gt; 0,'qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_n_g.png','qmem://&amp;lt;bundled&amp;gt;/BuiltIn/arrow_s_r.png'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666826#M1053256</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-21T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666827#M1053257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for pitching in the issue with my expression.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Adding the parenthesis at the end did work..&amp;nbsp; So dumb of me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 05:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666827#M1053257</guid>
      <dc:creator />
      <dc:date>2014-10-29T05:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666828#M1053258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, it does work. I missed the parenthesis at the end.. Max also works fine.. However, I have a condition to display the column only if there is one selection is made.. But this is a good learning to display the max selection when I dont use that condition.. Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 05:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666828#M1053258</guid>
      <dc:creator />
      <dc:date>2014-10-29T05:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if condition in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666829#M1053259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This too does work. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 05:10:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-condition-in-expressions/m-p/666829#M1053259</guid>
      <dc:creator />
      <dc:date>2014-10-29T05:10:06Z</dc:date>
    </item>
  </channel>
</rss>

