<?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 adding 2 different calculations to expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267651#M1204493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to do the following...&lt;/P&gt;&lt;P&gt;I have a LIST BOX which displays various DEAL DESCRIPTIONS. Linked to these DEAL DESCRIPTIONS are Sales quantities.&lt;/P&gt;&lt;P&gt;I have created an expression which divides the Sales quantities by 3 when a specific DEAL DESCRIPTION is selected.&lt;/P&gt;&lt;P&gt;This is my expression&lt;/P&gt;&lt;P&gt;If ([Deal Description] = '900000 - P5-P8 MEAL DEAL £3' ,Sum(SalesQuantity))/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to divide any other DEAL DESCRIPTION by 2.&lt;/P&gt;&lt;P&gt;The reason for this is that the above DEAL DESCRIPTION incorportaes 3 products. But all other DEAL DESCRIPTIONS only incorporates 2 products,&lt;/P&gt;&lt;P&gt;Does anyone know how i would include this in my expression?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jul 2010 13:13:17 GMT</pubDate>
    <dc:creator>hopkinsc</dc:creator>
    <dc:date>2010-07-24T13:13:17Z</dc:date>
    <item>
      <title>adding 2 different calculations to expression</title>
      <link>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267651#M1204493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to do the following...&lt;/P&gt;&lt;P&gt;I have a LIST BOX which displays various DEAL DESCRIPTIONS. Linked to these DEAL DESCRIPTIONS are Sales quantities.&lt;/P&gt;&lt;P&gt;I have created an expression which divides the Sales quantities by 3 when a specific DEAL DESCRIPTION is selected.&lt;/P&gt;&lt;P&gt;This is my expression&lt;/P&gt;&lt;P&gt;If ([Deal Description] = '900000 - P5-P8 MEAL DEAL £3' ,Sum(SalesQuantity))/3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to divide any other DEAL DESCRIPTION by 2.&lt;/P&gt;&lt;P&gt;The reason for this is that the above DEAL DESCRIPTION incorportaes 3 products. But all other DEAL DESCRIPTIONS only incorporates 2 products,&lt;/P&gt;&lt;P&gt;Does anyone know how i would include this in my expression?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 13:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267651#M1204493</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-07-24T13:13:17Z</dc:date>
    </item>
    <item>
      <title>adding 2 different calculations to expression</title>
      <link>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267652#M1204494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the else condition simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;If ([Deal Description] = '900000 - P5-P8 MEAL DEAL £3' ,Sum(SalesQuantity)/3, Sum(SalesQuantity)/2)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 13:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267652#M1204494</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-07-24T13:26:07Z</dc:date>
    </item>
    <item>
      <title>adding 2 different calculations to expression</title>
      <link>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267653#M1204495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, But where would i use the ELSE condition.&lt;/P&gt;&lt;P&gt;I have tried copying exactly whats in your example, and tried putting else before the second sum, but it doesn't work??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 13:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267653#M1204495</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2010-07-24T13:32:10Z</dc:date>
    </item>
    <item>
      <title>adding 2 different calculations to expression</title>
      <link>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267654#M1204496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dude copy the exactly same code which i posted earlier. ok&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Shumail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 14:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-2-different-calculations-to-expression/m-p/267654#M1204496</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-07-24T14:48:10Z</dc:date>
    </item>
  </channel>
</rss>

