<?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 Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation/m-p/233742#M85270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ranjit,&lt;/P&gt;&lt;P&gt;Try to implement this scenario at script level it will reduce complexity.&lt;/P&gt;&lt;P&gt;and I think you can easily implement at design level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Mar 2011 11:14:06 GMT</pubDate>
    <dc:creator>suniljain</dc:creator>
    <dc:date>2011-03-01T11:14:06Z</dc:date>
    <item>
      <title>Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation/m-p/233741#M85269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;Hi All,&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;I have two tables&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;Table1:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;"&gt;&lt;TD style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0in; width: 48pt; padding-top: 0in; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; border: black 1pt solid;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;Stages&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: black 1pt solid; padding-left: 5.4pt; padding-bottom: 0in; border-left: #ece9d8; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;Division&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt; mso-yfti-irow: 1;"&gt;&lt;TD style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: #ece9d8; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;S1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: #ece9d8; padding-left: 5.4pt; padding-bottom: 0in; border-left: #ece9d8; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;"&gt;&lt;TD style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: #ece9d8; padding-left: 5.4pt; padding-bottom: 0in; border-left: black 1pt solid; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;S2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: black 1pt solid; padding-right: 5.4pt; border-top: #ece9d8; padding-left: 5.4pt; padding-bottom: 0in; border-left: #ece9d8; width: 48pt; padding-top: 0in; border-bottom: black 1pt solid; height: 15pt; background-color: transparent; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; mso-border-bottom-themecolor: text1; mso-border-right-themecolor: text1;" valign="top" width="64"&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal;"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Table 2:&lt;BR /&gt;This table has field called DocID in the table itself. Using Filebasename function I have taken the field Stages. So totally I have two excel sheets one with S1 and another with S2. Here Stages is the Key field.&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;I am taking the count(DocID)&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;So In S1 - Count(DocID) is 100&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;In S2 - Count(DocID) is 200&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;My question.&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;If I select S1- qlikview should calculate 100*2&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;If I select S2 - qlikview should calculate 200*3&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;If I select S1&amp;amp;S2 - it should give 200+600 = 800&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;I have tried =&lt;B&gt;count&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Stages&lt;/B&gt;=&lt;B&gt;Stages&lt;/B&gt;, &lt;B&gt;DocID&lt;/B&gt;))*&lt;B&gt;sum&lt;/B&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;Stages&lt;/B&gt;=&lt;B&gt;Stages&lt;/B&gt;, &lt;B&gt;Division&lt;/B&gt;))&lt;BR /&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;But when I select S1&amp;amp;S2 its giving (100+200) *(3+2) = 1500&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;Please let me me if anyone needs further clarification. Seems to be simple, but there lying a trick.&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;Please what to do to get the required answer. Thanks in advance.&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 11:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation/m-p/233741#M85269</guid>
      <dc:creator>renjithpl</dc:creator>
      <dc:date>2011-03-01T11:08:40Z</dc:date>
    </item>
    <item>
      <title>Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation/m-p/233742#M85270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ranjit,&lt;/P&gt;&lt;P&gt;Try to implement this scenario at script level it will reduce complexity.&lt;/P&gt;&lt;P&gt;and I think you can easily implement at design level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 11:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation/m-p/233742#M85270</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2011-03-01T11:14:06Z</dc:date>
    </item>
  </channel>
</rss>

