<?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 not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830729#M469216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Peter thanks for the advice! about your question, "Total Discount%" refers to another column with an expression. The goal of this operation is to calculate commission rates, therefore multiple expressions are used to do this in the QVD below you will see that Actual Comm%, Total Discount%, Amount after discount are used to calculate the TOTAL Comm Amount column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the ultimate goal but when turned into a pivot table the functions do not work as they rely on the columns and they produce null values which mess with the subtotals and the grand totals. Rendering the whole document useless for its purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think you can help with this problem? &lt;A href="https://community.qlik.com/qlik-users/3540"&gt;pcammaert&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2015 15:33:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-20T15:33:16Z</dc:date>
    <item>
      <title>Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830724#M469211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys for what reason QLik cannot calculate this expression. It works in a straight table but when it is loaded in pivot table it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14373986364752947" jivemacro_uid="_14373986364752947"&gt;
&lt;P&gt;=if(commpcnt1&amp;lt;&amp;gt;commpcnt,if(commpcnt1=0.01,commpcnt1=0,(commpcnt1/100)),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; if(rep1=99 and left(seas_name,2)='SP',0.12,&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("Total Discount%"*100&amp;lt;=discord1,(commpcnt/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord1 AND "Total Discount%"*100&amp;lt;=discord2 or discord1&amp;gt;discord2,((commpcnt-reduce1)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord2 AND "Total Discount%"*100&amp;lt;=discord3 or discord2&amp;gt;discord3,((commpcnt-reduce2)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord3 AND "Total Discount%"*100&amp;lt;=discord4 or discord3&amp;gt;discord4,((commpcnt-reduce3)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord4 AND "Total Discount%"*100&amp;lt;=discord5 or discord4&amp;gt;discord5,((commpcnt-reduce4)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord5 AND "Total Discount%"*100&amp;lt;=discord6 or discord5&amp;gt;discord6,((commpcnt-reduce5)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord6 AND "Total Discount%"*100&amp;lt;=discord7 or discord6&amp;gt;discord7,((commpcnt-reduce6)/100),&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord7,((commpcnt-reduce7)/100))))))))))))))))))&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 13:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830724#M469211</guid>
      <dc:creator />
      <dc:date>2015-07-20T13:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830725#M469212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a pivot table, rows can be collapsed, leading to some or all dimension fields in your nested IF producing multiple values. An expression treats an operand that produces multiple values as NULL, and this propagates in weird ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my turn to ask a question &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;: what do the multiple occurrences of "Total Discount%" refer to? QlikView treats things like that as a literal text string, but your trying to multiply this spec by 100 makes me think that you try to refer to a field that has spaces in its name. You should use [Total Discount%] to refer to such a field, as text strings cannot be used in numerical expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 13:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830725#M469212</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-07-20T13:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830726#M469213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this is a typo or if that is what causing the issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;if(commpcnt1=0.01, commpcnt1=0,(commpcnt1/100)),&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt; needs to be this may be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;if(commpcnt1=0.01 &lt;SPAN style="color: #ff0000;"&gt;and/or&lt;/SPAN&gt; commpcnt1=0,(commpcnt1/100)) &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;if(commpcnt1=0.01&lt;SPAN style="color: #ff0000;"&gt;, If(&lt;/SPAN&gt;commpcnt1=0,(commpcnt1/100))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #333333; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="dp-highlighter"&gt;&lt;OL class="dp-c" start="1"&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN&gt;=if(commpcnt1&amp;lt;&amp;gt;commpcnt&lt;SPAN style="color: #ff0000;"&gt;,&lt;STRONG&gt;if(commpcnt1=0.01,commpcnt1=0,(commpcnt1/100)), &lt;/STRONG&gt; &lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp; if(rep1=99 and left(seas_name,2)='SP',0.12,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("Total Discount%"*100&amp;lt;=discord1,(commpcnt/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord1 AND "Total Discount%"*100&amp;lt;=discord2 or discord1&amp;gt;discord2,((commpcnt-reduce1)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord2 AND "Total Discount%"*100&amp;lt;=discord3 or discord2&amp;gt;discord3,((commpcnt-reduce2)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord3 AND "Total Discount%"*100&amp;lt;=discord4 or discord3&amp;gt;discord4,((commpcnt-reduce3)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord4 AND "Total Discount%"*100&amp;lt;=discord5 or discord4&amp;gt;discord5,((commpcnt-reduce4)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord5 AND "Total Discount%"*100&amp;lt;=discord6 or discord5&amp;gt;discord6,((commpcnt-reduce5)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord6 AND "Total Discount%"*100&amp;lt;=discord7 or discord6&amp;gt;discord7,((commpcnt-reduce6)/100),&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if("Total Discount%"*100&amp;gt;discord7,((commpcnt-reduce7)/100))))))))))))))))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 13:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830726#M469213</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-20T13:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830727#M469214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st class eyesight, Sunny. I didn't even see that one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the best thing Rajat can do is simplify the expression. If only to improve maintainability...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 13:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830727#M469214</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-07-20T13:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830728#M469215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree, its a very complicated if statement and simplifying it would be very advisable &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/Rajats.1709"&gt;Rajats.1709&lt;/A&gt;‌&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 14:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830728#M469215</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-20T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830729#M469216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Peter thanks for the advice! about your question, "Total Discount%" refers to another column with an expression. The goal of this operation is to calculate commission rates, therefore multiple expressions are used to do this in the QVD below you will see that Actual Comm%, Total Discount%, Amount after discount are used to calculate the TOTAL Comm Amount column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the ultimate goal but when turned into a pivot table the functions do not work as they rely on the columns and they produce null values which mess with the subtotals and the grand totals. Rendering the whole document useless for its purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think you can help with this problem? &lt;A href="https://community.qlik.com/qlik-users/3540"&gt;pcammaert&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 15:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830729#M469216</guid>
      <dc:creator />
      <dc:date>2015-07-20T15:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If Condition not working</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830730#M469217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sunindia!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to hear from you. It is extremely complicated and so hard to maintain for any changes. Is there a way to simplify all this. With my current knowledge i see no way. Maybe you and &lt;A href="https://community.qlik.com/qlik-users/3540"&gt;pcammaert&lt;/A&gt;‌ can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Rajat &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 15:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-Condition-not-working/m-p/830730#M469217</guid>
      <dc:creator />
      <dc:date>2015-07-20T15:35:03Z</dc:date>
    </item>
  </channel>
</rss>

