<?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 Someone can help me with this IF conditional expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229380#M81309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am not quite sure what you are trying to achieve here.&lt;/P&gt;&lt;P&gt;The issue you will have with your first statement is that it is not possible to nest aggregations (and indeed it makes no logical sense to).&lt;/P&gt;&lt;P&gt;The aggr statement may well assist you in what you are after. This returns a record set with values from a expression over specified fields. You need to know which field you are looking for the -1 over.&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum(if(aggr(sum(value), field) &amp;lt; -1, aggr(sum(value), field), 0))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You will need to replace &lt;STRONG&gt;sum(value)&lt;/STRONG&gt; with your expression in both cases, and &lt;STRONG&gt;field&lt;/STRONG&gt; with the field you wish to aggregate over.&lt;/P&gt;&lt;P&gt;If you wish to test out the expression above then use this inline statement in your load:&lt;/P&gt;&lt;PRE&gt;&lt;B&gt;load * inline [field,valuea,2a,-4b,2b,-1c,5c,-7d,4d,6];&lt;/B&gt;&lt;/PRE&gt;&lt;P&gt;You will see it only totals a and c.&lt;/P&gt;&lt;P&gt;If the -1 you are looking for is on a single row of your data then you need to remove all of the sum statements from your nested expression, and then this can be written without the need for the aggr statement. Given that Set Analysis only works within aggregations you will need to either move this to the outer sum or re-write it to be an if statement.&lt;/P&gt;&lt;P&gt;Hope that helps. Please post back more detail on your issue if you require further help.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2011 10:59:33 GMT</pubDate>
    <dc:creator>stevedark</dc:creator>
    <dc:date>2011-04-26T10:59:33Z</dc:date>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229378#M81307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;B&gt;(&lt;/B&gt;if (Sum ( {&amp;lt;Fase_id = {'10','11'}&amp;gt;} ((If (Data_fase_retorno &amp;lt; '0' , (TQte ))))) + Sum (Q_estTT) - Sum (QpT_abto ) &lt;STRONG&gt;&amp;lt;=-1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Just SUM if the expression below was less or equal -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Sum ( {&amp;lt;Fase_id = {'10','11'}&amp;gt;} ((If (Data_fase_retorno &amp;lt; '0' , (TQte))))) + Sum (Q_estTT) - Sum (QpT_abto)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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 Apr 2011 10:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229378#M81307</guid>
      <dc:creator />
      <dc:date>2011-04-26T10:36:24Z</dc:date>
    </item>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229379#M81308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use&lt;/P&gt;&lt;P&gt;if(x&amp;lt;=-1,Sum()) with x the expression you posted.&lt;/P&gt;&lt;P&gt;You need to use " instead of ' in set analysis.&lt;/P&gt;&lt;P&gt;And watch the number of '(' compared to the number of ')' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 10:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229379#M81308</guid>
      <dc:creator />
      <dc:date>2011-04-26T10:48:07Z</dc:date>
    </item>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229380#M81309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am not quite sure what you are trying to achieve here.&lt;/P&gt;&lt;P&gt;The issue you will have with your first statement is that it is not possible to nest aggregations (and indeed it makes no logical sense to).&lt;/P&gt;&lt;P&gt;The aggr statement may well assist you in what you are after. This returns a record set with values from a expression over specified fields. You need to know which field you are looking for the -1 over.&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum(if(aggr(sum(value), field) &amp;lt; -1, aggr(sum(value), field), 0))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You will need to replace &lt;STRONG&gt;sum(value)&lt;/STRONG&gt; with your expression in both cases, and &lt;STRONG&gt;field&lt;/STRONG&gt; with the field you wish to aggregate over.&lt;/P&gt;&lt;P&gt;If you wish to test out the expression above then use this inline statement in your load:&lt;/P&gt;&lt;PRE&gt;&lt;B&gt;load * inline [field,valuea,2a,-4b,2b,-1c,5c,-7d,4d,6];&lt;/B&gt;&lt;/PRE&gt;&lt;P&gt;You will see it only totals a and c.&lt;/P&gt;&lt;P&gt;If the -1 you are looking for is on a single row of your data then you need to remove all of the sum statements from your nested expression, and then this can be written without the need for the aggr statement. Given that Set Analysis only works within aggregations you will need to either move this to the outer sum or re-write it to be an if statement.&lt;/P&gt;&lt;P&gt;Hope that helps. Please post back more detail on your issue if you require further help.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 10:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229380#M81309</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-26T10:59:33Z</dc:date>
    </item>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229381#M81310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am not quite sure what you are trying to achieve here.&lt;/P&gt;&lt;P&gt;The issue you will have with your first statement is that it is not possible to nest aggregations (and indeed it makes no logical sense to).&lt;/P&gt;&lt;P&gt;The aggr statement may well assist you in what you are after. This returns a record set with values from a expression over specified fields. You need to know which field you are looking for the -1 over.&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum(if(aggr(sum(value), field) &amp;lt; -1, aggr(sum(value), field), 0))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You will need to replace &lt;STRONG&gt;sum(value)&lt;/STRONG&gt; with your expression in both cases, and &lt;STRONG&gt;field&lt;/STRONG&gt; with the field you wish to aggregate over.&lt;/P&gt;&lt;P&gt;If you wish to test out the expression above then use this inline statement in your load:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;load * inline [field,valuea,2a,-4b,2b,-1c,5c,-7d,4d,6];&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;You will see it only totals a and c.&lt;/P&gt;&lt;P&gt;If the -1 you are looking for is on a single row of your data then you need to remove all of the sum statements from your nested expression, and then this can be written without the need for the aggr statement. Given that Set Analysis only works within aggregations you will need to either move this to the outer sum or re-write it to be an if statement.&lt;/P&gt;&lt;P&gt;Hope that helps. Please post back more detail on your issue if you require further help.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 11:05:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229381#M81310</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-26T11:05:36Z</dc:date>
    </item>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229382#M81311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies, I was getting error messages on posting. This caused me to try and repost causing multiple posts.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:33:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229382#M81311</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-26T12:33:01Z</dc:date>
    </item>
    <item>
      <title>Someone can help me with this IF conditional expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229383#M81312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steave, thanks for your reply.&lt;/P&gt;&lt;P&gt;I will try to explain better using the information below.&lt;/P&gt;&lt;P&gt;I need to get the sum line just for negative quantities&lt;/P&gt;&lt;P&gt;Regards, Rodrigo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width:634pt;border-collapse:collapse;" width="845"&gt;&lt;COLGROUP&gt;&lt;COL style="width:82pt;mso-width-source:userset;mso-width-alt:3986;" width="109" /&gt;&lt;COL style="width:61pt;mso-width-source:userset;mso-width-alt:2962;" width="81" /&gt;&lt;COL span="4" style="width:36pt;mso-width-source:userset;mso-width-alt:1755;" width="48" /&gt;&lt;COL style="width:48pt;" width="64" /&gt;&lt;COL style="width:84pt;mso-width-source:userset;mso-width-alt:4096;" width="112" /&gt;&lt;COL style="width:23pt;mso-width-source:userset;mso-width-alt:1133;" width="31" /&gt;&lt;COL span="4" style="width:48pt;" width="64" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="background-color:transparent;width:82pt;height:15pt;border:#a5a5a5 0.5pt solid;" width="109"&gt;STYLE&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:61pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="81"&gt;COLOR&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:36pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="48"&gt;S&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:36pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="48"&gt;M&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:36pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="48"&gt;L&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:36pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="48"&gt;XL&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:48pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="64"&gt;TOTAL&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;width:84pt;border-top:#a5a5a5 0.5pt solid;border-right:#a5a5a5 0.5pt solid;" width="112"&gt;TOTAL NEGATIVE&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;width:23pt;border:#f0f0f0;" width="31"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;width:48pt;border:#f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;width:48pt;border:#f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;width:48pt;border:#f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;width:48pt;border:#f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl68" height="80" rowspan="4" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5 0.5pt solid;background-color:transparent;height:60pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;T-SHIRT&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;black&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;10&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="2" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;TOTAL is a regular sum&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;height:15pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;yellow&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;23&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;21&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-1&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;49&lt;/TD&gt;&lt;TD class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="4" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;TOTAL NEGATIVE sum just negative quantities&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;height:15pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;blue&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-11&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-18&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-18&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-15&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-62&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-62&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;height:15pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;red&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-2&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-4&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-1&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-7&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="4" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;I need to rank the products from the large total negative.&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl68" height="40" rowspan="2" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5 0.5pt solid;background-color:transparent;height:30pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;JACKET&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;black&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-9&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-18&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-12&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-29&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-39&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl65" height="20" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:transparent;height:15pt;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;blue&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-11&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-21&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-22&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-13&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-67&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom:#a5a5a5 0.5pt solid;border-left:#a5a5a5;background-color:white;border-top:#a5a5a5;border-right:#a5a5a5 0.5pt solid;"&gt;-67&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl72" colspan="5" height="20" style="background-color:transparent;height:15pt;mso-ignore:colspan;border:#f0f0f0;"&gt;I'm using the expression below to get the regular sum result&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;-84&lt;/TD&gt;&lt;TD align="right" class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;-165&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl70" colspan="8" height="20" style="background-color:transparent;height:15pt;mso-ignore:colspan;border:#f0f0f0;"&gt;Sum ( {&amp;lt;Fase_id = {'10','11'}&amp;gt;} ((If (Data_fase_retorno &amp;lt; '0' , (Q1))))) + Sum (Q_est1) - Sum (Qp1_abto)&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl70" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl71" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;Fase_id&lt;/TD&gt;&lt;TD class="xl66" colspan="7" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;10 and 11 is production steps (in this case transportation from the factory to the warehouse)&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl71" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;Data_fase_retorno&lt;/TD&gt;&lt;TD class="xl66" colspan="5" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;if this date was zero, return the quatity production&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl71" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;Q1&lt;/TD&gt;&lt;TD class="xl66" colspan="3" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;quantity in production (SIZE S)&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl71" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;Q_est1&lt;/TD&gt;&lt;TD class="xl66" colspan="2" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;quantity in stock (SIZE S)&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height:15pt;"&gt;&lt;TD class="xl71" height="20" style="background-color:transparent;height:15pt;border:#f0f0f0;"&gt;Qp1_abto&lt;/TD&gt;&lt;TD class="xl66" colspan="4" style="background-color:transparent;mso-ignore:colspan;border:#f0f0f0;"&gt;quantity in open order (customer) (SIZE S)&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="background-color:transparent;border:#f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 11:04:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Someone-can-help-me-with-this-IF-conditional-expression/m-p/229383#M81312</guid>
      <dc:creator />
      <dc:date>2011-04-27T11:04:05Z</dc:date>
    </item>
  </channel>
</rss>

