<?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 and Sum syntax - Color Background Help in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057373#M16892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I am once again glad that I am able to help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 14:41:02 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-03-23T14:41:02Z</dc:date>
    <item>
      <title>Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057370#M16889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community.&lt;/P&gt;&lt;P&gt;Can anyone help me understand why my code does not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;I have a table like this in Qlik Sense.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Names&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;% &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Patrick&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Mathew&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Leo&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Junior&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;95&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to make a color background in the % column.&lt;/P&gt;&lt;P&gt;When Category A is over 75%, paint it in green, red. &lt;/P&gt;&lt;P&gt;When Category B is over 75%, paint it in green,&amp;nbsp; red.&lt;/P&gt;&lt;P&gt;When Category Junio is over 95%. green, if not, red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;The % column has the following sum:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;"Facturable Real"={Facturable}&amp;gt;} Cantidad) / sum(Cantidad)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;So I tried the following syntax:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={"A"}&amp;gt;} Cantidad)&lt;/P&gt;&lt;P&gt;/Sum({&amp;lt;"Category"={"A"}&amp;gt;} Cantidad)&amp;gt;=0.75,&lt;/P&gt;&lt;P&gt;RGB(50,149,50), RGB(170,57,57) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far this one works, but when I try to add more "IF" it gives me a syntax error... I tried using "and" and "or".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;.:::::::&amp;nbsp; If i Manage to connect the following it should work... .:::::...:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;if(Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={"A"}&amp;gt;} Cantidad)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;/Sum({&amp;lt;"Category"={"A"}&amp;gt;} Cantidad)&amp;gt;=0.75,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;RGB(50,149,50), RGB(170,57,57) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;if(Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={"B"}&amp;gt;} Cantidad)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;/Sum({&amp;lt;"Category"={"B"}&amp;gt;} Cantidad)&amp;gt;=0.75,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;RGB(50,149,50), RGB(170,57,57) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;if(Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={"Junior"}&amp;gt;} Cantidad)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;/Sum({&amp;lt;"Category"={"Junior"}&amp;gt;} Cantidad)&amp;gt;=0.95,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;RGB(50,149,50), RGB(170,57,57) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 14:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057370#M16889</guid>
      <dc:creator>patriciousa</dc:creator>
      <dc:date>2016-03-23T14:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057371#M16890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={'A', 'B'}&amp;gt;} Cantidad)&lt;SPAN style="line-height: 1.5em;"&gt;/Sum({&amp;lt;"Category"={'A', 'B'}&amp;gt;} Cantidad)&amp;gt;=0.75 or &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Sum({&amp;lt;"Facturable Real"={Facturable},"Category"={'Junior'}&amp;gt;} Cantidad)&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;/Sum({&amp;lt;"Category"={'Junior'}&amp;gt;} Cantidad)&amp;gt;=0.95&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;STRONG&gt;RGB(50,149,50), RGB(170,57,57))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 14:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057371#M16890</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-23T14:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057372#M16891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, you rock man.&lt;/P&gt;&lt;P&gt;You have helped me many times already.&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;&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, 23 Mar 2016 14:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057372#M16891</guid>
      <dc:creator>patriciousa</dc:creator>
      <dc:date>2016-03-23T14:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057373#M16892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I am once again glad that I am able to help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 14:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057373#M16892</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-23T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057374#M16893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more quick question. If i want to add a new Category, like, Director and it should be 50%, how? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt; I'm trying to copy your syntax but is giving me syntax error.... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/devil.png" /&gt;&lt;/P&gt;&lt;P&gt;Haha Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 14:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057374#M16893</guid>
      <dc:creator>patriciousa</dc:creator>
      <dc:date>2016-03-23T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057375#M16894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nvm... Got it &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, 23 Mar 2016 14:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057375#M16894</guid>
      <dc:creator>patriciousa</dc:creator>
      <dc:date>2016-03-23T14:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple IF and Sum syntax - Color Background Help</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057376#M16895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another possible solution could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;"Facturable Real"={Facturable}&amp;gt;} Cantidad) / sum(Cantidad)&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;gt; Pick(Match(Category,'A','B','Junior'),0.75,0.75,0.95),&lt;/P&gt;&lt;P&gt;RGB(50,149,50), RGB(170,57,57)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avoiding multiple aggregations with set expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 14:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-IF-and-Sum-syntax-Color-Background-Help/m-p/1057376#M16895</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-23T14:51:34Z</dc:date>
    </item>
  </channel>
</rss>

