<?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: expression not calculating correctly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871982#M993664</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;=num((Sum({$&amp;lt; Type={GRN},PONumber-={"*TRANSIT"}&amp;gt;}QTY)+sum({$&amp;lt;Type={PICK}&amp;gt;}QTY))&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2015 14:57:17 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2015-07-14T14:57:17Z</dc:date>
    <item>
      <title>expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871979#M993661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been playing around with the following expression to get it to calculate correctly but I cannot get it to behave as I expect. It doesn't matter where I put the brackets it gives me an error in expression. If I leave it as is it is calculating the second part of the expression first.&lt;/P&gt;&lt;P&gt;All 3 part work as individual expressions.&lt;/P&gt;&lt;P&gt;I can add the 2 QTY together without issue and divide one of the 2 QTY figures with the variable.&lt;/P&gt;&lt;P&gt;I want to add the 2 QTY figures together then divide by the variable but what is actually happening is the PICK QTY is getting divided by the variable and then added to the GRN QTY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={GRN},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PONumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"*TRANSIT"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}QTY)+sum({$&amp;lt;Type={PICK}&amp;gt;}QTY)/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can I fix this so it adds first then divides?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks Steve&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871979#M993661</guid>
      <dc:creator />
      <dc:date>2015-07-14T14:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871980#M993662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;=N&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;um(&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;Sum({$&amp;lt;Type={GRN}, PONumber-={"*TRANSIT"&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;}&amp;gt;}QTY) + Sum({$&amp;lt;Type={PICK}&amp;gt;}QTY)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; /&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;(vTotalManHours- (vHolidays + vSickness + vHospDocsDentist + vAuthorisedAbsence + vUnauthorisedAbsence + vOvertime + vAgency)), '#,##0.00')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871980#M993662</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-14T14:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871981#M993663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Num(Sum({$&amp;lt;Type={'GRN'},PONumber={'*'}-{'*TRANSIT'}&amp;gt;}QTY)+sum({$&amp;lt;Type={'PICK'}&amp;gt;}QTY)/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871981#M993663</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-07-14T14:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871982#M993664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;=num((Sum({$&amp;lt; Type={GRN},PONumber-={"*TRANSIT"}&amp;gt;}QTY)+sum({$&amp;lt;Type={PICK}&amp;gt;}QTY))&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;/&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871982#M993664</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-07-14T14:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871983#M993665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={GRN},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PONumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"*TRANSIT"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}QTY)+sum({$&amp;lt;Type={PICK}&amp;gt;}QTY))/(vTotalManHours-(vHolidays+vSickness+vHospDocsDentist+vAuthorisedAbsence+vUnauthorisedAbsence+vOvertime+vAgency)),'#,##0.00') &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871983#M993665</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-07-14T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871984#M993666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone. I was in danger of putting brackets everywhere but where they needed to go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871984#M993666</guid>
      <dc:creator />
      <dc:date>2015-07-14T15:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: expression not calculating correctly</title>
      <link>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871985#M993667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately this gives me the same answer as I was getting which is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-not-calculating-correctly/m-p/871985#M993667</guid>
      <dc:creator />
      <dc:date>2015-07-14T15:05:16Z</dc:date>
    </item>
  </channel>
</rss>

