<?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: Multiple if statements in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82232#M788312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please provide the snapshot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Feb 2018 17:27:27 GMT</pubDate>
    <dc:creator>alis2063</dc:creator>
    <dc:date>2018-02-09T17:27:27Z</dc:date>
    <item>
      <title>Multiple if statements in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82231#M788311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am building a large complex expression to calculate some total figures, but it seems as if a null value, or 0.00 amount breaks the expression down the line. I am not sure where. Each expression follows the same pattern but adds on another line each time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try explain it in pseudo code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my base calculation&amp;nbsp; which sums some columns to get a total figure. they are the base costs.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then add some additional charges to these costs. (a simple if charge type =1, then rate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; then calculate an additional charge when can either be a flat amount, or a percentage of the previously calculated total +&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; additional costs&lt;/P&gt;&lt;P&gt;&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; then calculate a discount on the new final amount, which again can be a flat fee or percentage based on the new&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; total. &lt;/P&gt;&lt;P&gt;&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;&amp;nbsp; the finally a complete total, which is just a total minus the last charge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried building it step by step, but generally fall at certain hurdles. I can calculate the additional charges separately but when I try to add them together, it somehow breaks. I think my if statements may be out, or not have enough. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice on how to build this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82231#M788311</guid>
      <dc:creator>Qlik_ULG</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple if statements in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82232#M788312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please provide the snapshot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 17:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82232#M788312</guid>
      <dc:creator>alis2063</dc:creator>
      <dc:date>2018-02-09T17:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple if statements in expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82233#M788313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;(// ++++++++++++++++++++++=++++++++++++++++++++++++++++ Total Charges&lt;/P&gt;&lt;P&gt;((sum(word_count_100))*rate_count_100) + &lt;/P&gt;&lt;P&gt;((sum(word_count_rep))*rate_count_rep) + &lt;/P&gt;&lt;P&gt;((sum(word_count_perfect))*rate_count_perfect) + &lt;/P&gt;&lt;P&gt;((sum(word_count_95_99))*rate_count_95_99) + &lt;/P&gt;&lt;P&gt;((sum(word_count_85_94))*rate_count_85_94) + &lt;/P&gt;&lt;P&gt;((sum(word_count_75_84))*rate_count_75_84) + &lt;/P&gt;&lt;P&gt;((sum(word_count_no_match))*rate_count_no_match) + &lt;/P&gt;&lt;P&gt;((sum(word_count_50_74))*rate_count_50_74) &lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;// ++++++++++++++++++++++=++++++++++++++++++++++++++++ charges to be added&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '7', ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [Proof_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '6' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [multilingual_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '8' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_&lt;/SPAN&gt;Rate]* [Certification Hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;calculate total charges&lt;/P&gt;&lt;P&gt;_______________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(// ++++++++++++++++++++++=++++++++++++++++++++++++++++ Total Charges&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_100))*rate_count_100) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_rep))*rate_count_rep) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_perfect))*rate_count_perfect) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_95_99))*rate_count_95_99) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_85_94))*rate_count_85_94) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_75_84))*rate_count_75_84) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_no_match))*rate_count_no_match) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_50_74))*rate_count_50_74) &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// ++++++++++++++++++++++=++++++++++++++++++++++++++++ charges to be added&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '7', ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [Proof_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '6' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [multilingual_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '8' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_&lt;/SPAN&gt;Rate]* [Certification Hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//++++++++++++++++++++++++++++++++++++++++++++++ add PM Fee &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;IF([PM FEE as %] = '0' , [PM Fee Rate] / Target_Language_COUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([PM FEE as %] = '1' ,&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(// ++++++++++++++++++++++=++++++++++++++++++++++++++++ Total Charges&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_100))*rate_count_100) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_rep))*rate_count_rep) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_perfect))*rate_count_perfect) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_95_99))*rate_count_95_99) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_85_94))*rate_count_85_94) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_75_84))*rate_count_75_84) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_no_match))*rate_count_no_match) + &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((sum(word_count_50_74))*rate_count_50_74) &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// ++++++++++++++++++++++=++++++++++++++++++++++++++++ charges to be added&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '7', ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [Proof_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '6' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Rate&lt;/SPAN&gt;]* [multilingual_hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;+&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_Type&lt;/SPAN&gt;] = '8' , ([&lt;SPAN style="font-size: 13.3333px;"&gt;othercharges_Charge_&lt;/SPAN&gt;Rate]* [Certification Hours]) / Target_Language_COUNT , '0') &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P&gt;//++++++++++++++++++++++++++++++++++++++++++++++ multiply by PM Fee %&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;100 * [PM Fee Rate]&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;included rate to be added on&lt;/P&gt;&lt;P&gt;________________________________________________________&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 13:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-if-statements-in-expression/m-p/82233#M788313</guid>
      <dc:creator>Qlik_ULG</dc:creator>
      <dc:date>2018-02-12T13:30:35Z</dc:date>
    </item>
  </channel>
</rss>

