<?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 Evaluating Multiple if statements to create a total score in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26052#M1776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica; font-size: 10pt;"&gt;’ve been trying to figure out a solution for the following problem and unfortunately have not been successful.&amp;nbsp; I hope someone in the community can help – and thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Let’s say we’re having a sales contest and there are 5 different bonuses. Each bonus has a different calculation. I need to go through a series of calculations (or rules / if statements) to determine if each bonus has been met. I then want the total number of bonus met to appear in a table.&amp;nbsp; We will then provide a dollar figure for each bonus.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Here’s an example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;If(a+b &amp;gt;=40, 1, 0)&lt;BR /&gt; If(c/d &amp;gt;=.70, 1, 0)&lt;BR /&gt; If(F-E&amp;lt;10, 1, 0)… and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;I then want to add up the 1’s to come up with a total number of bonuses hit. If only 2 of the statements evaluate as true, then a 2 will appear in the table, if 4 are true, then 4 will appear for that salesperson.&amp;nbsp; We will then provide a monetary bonus for meeting 1,2,3,4 or all 5 bonuses.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;By using if statements, I cannot make it through each statement to get a total. I’ve thought about Switch / Case, Match, etc. but simply cannot figure this one out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Does anyone have an idea for a solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Rick&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 19:35:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-14T19:35:55Z</dc:date>
    <item>
      <title>Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26052#M1776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica; font-size: 10pt;"&gt;’ve been trying to figure out a solution for the following problem and unfortunately have not been successful.&amp;nbsp; I hope someone in the community can help – and thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Let’s say we’re having a sales contest and there are 5 different bonuses. Each bonus has a different calculation. I need to go through a series of calculations (or rules / if statements) to determine if each bonus has been met. I then want the total number of bonus met to appear in a table.&amp;nbsp; We will then provide a dollar figure for each bonus.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Here’s an example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;If(a+b &amp;gt;=40, 1, 0)&lt;BR /&gt; If(c/d &amp;gt;=.70, 1, 0)&lt;BR /&gt; If(F-E&amp;lt;10, 1, 0)… and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;I then want to add up the 1’s to come up with a total number of bonuses hit. If only 2 of the statements evaluate as true, then a 2 will appear in the table, if 4 are true, then 4 will appear for that salesperson.&amp;nbsp; We will then provide a monetary bonus for meeting 1,2,3,4 or all 5 bonuses.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;By using if statements, I cannot make it through each statement to get a total. I’ve thought about Switch / Case, Match, etc. but simply cannot figure this one out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Does anyone have an idea for a solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="font-family: Helvetica; color: #3d3d3d;"&gt;Rick&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 19:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26052#M1776</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-14T19:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26053#M1777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd to it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000;"&gt;Bonus_tmp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;Load *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(a+b &amp;gt;=40, 1, 0) as Bonus1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(c/d &amp;gt;=.70, 1, 0) as Bonus2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(F-E&amp;lt;10, 1, 0)...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... as BonusN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&gt;From Source;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13px; font-family: Helvetica;"&gt;NoConcatenate&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Bonus:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;Load *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: Helvetica; font-size: 13px;"&gt;Bonus1 + &lt;SPAN style="font-family: Helvetica; font-size: 13px;"&gt;Bonus2 + ... + &lt;SPAN style="font-family: Helvetica; font-size: 13px;"&gt;BonusN as TotalBonus&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;Bonus_tmp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;Drop table &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG style="color: #000000;"&gt;Bonus_tmp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Josefina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 17:36:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26053#M1777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T17:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26054#M1778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Josefina -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&amp;nbsp; I think it's on the right track.&amp;nbsp; However, I have used set analysis in my measures to calculate the bonuses.&amp;nbsp; I'm having a difficult time creating the same "filters" in a load statement.&amp;nbsp; I tried to simplify my question in hopes that it would help in getting a solution.&amp;nbsp; I have 5 different calculations using set analysis.&amp;nbsp; One of those calculations is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(avg({ $ &amp;lt;[Pre-Diabetes]={1},&amp;nbsp; [Grant Patient]={'Grant Patient'}, [HbA1C Current] &amp;gt; }[HbA1C Current])-&lt;/P&gt;&lt;P&gt;avg({ $ &amp;lt;[Pre-Diabetes]={1},&amp;nbsp; [Grant Patient]={'Grant Patient'}, [HbA1C Pre-Test] &amp;gt; }[HbA1C Pre-Test])&amp;lt;= -0.4,1,0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In reality, this calculates if a patient who has pre-diabetes has seen an improvement in the HbA1c labs measures.&amp;nbsp; If the improvement (meaning going lower) is less than -.4 points, then its considered a win.&amp;nbsp; I need to do this as an average for different doctors and their patients.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if the latest averages of the "current test" = 5.7 and the averages of the Pre-test = 6.2, then the result of the averages is -.5 (5.7-6.2).&amp;nbsp; This would be a 1 and would count towards a bonus (Bonus1).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 4 additional formulas such as the one above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you still think this will work on a Load of a temporary table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26054#M1778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T19:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26055#M1779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe have a temporary table with the columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patient | Doctor | avg&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;[HbA1C Current] | avg&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;[HbA1C Pre-Test]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The main problem here can be if a patient can have different doctors for the same indicators, because in that case the table won't be useful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In this case i'd go for the set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have you tried just adding the if's? Like if(clause1, 1, 0) + ... + &lt;SPAN style="font-size: 13.3333px;"&gt;if(clauseN, 1, 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 20:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26055#M1779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T20:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26056#M1780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Josefina -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the hint about how to insert several, but separate if statements.&amp;nbsp; I accomplished my objective by simply putting in one if statement with a 1 for true and 0 for not true.&amp;nbsp; Then I inserted a + sign and then put in another separate if statement and so on.&amp;nbsp; Works like a charm.&amp;nbsp; Thank you for the hints and your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2018 11:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26056#M1780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-19T11:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluating Multiple if statements to create a total score</title>
      <link>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26057#M1781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2018 17:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Evaluating-Multiple-if-statements-to-create-a-total-score/m-p/26057#M1781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-19T17:13:06Z</dc:date>
    </item>
  </channel>
</rss>

