<?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: Calculation issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429514#M1152546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that in the table i attached there is 2 columns AMShift and PMShift to show if the formula uses those values for calculation and it does, but the result i get (surveys done in AM shift)&amp;nbsp; is more than the number of surveys done at that location. so when i substitute in formula with the original value it works, so there is something about AMShift and PMShift which is wrong !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 05:04:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-09T05:04:30Z</dc:date>
    <item>
      <title>Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429509#M1152541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the attached pivot table. For the dimension i used locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now for morning shift calculation i used = &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AMEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AMStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1,0))&amp;nbsp; But it gives wrong result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;But if i substitute the values for AMEnd and AMStart that is for example Bateen:&amp;nbsp; =&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;55800 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;32400&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1,0)) then i get the correct result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;WHAT AM I DOING WRONG HERE ???!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Apr 2013 16:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429509#M1152541</guid>
      <dc:creator />
      <dc:date>2013-04-07T16:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429510#M1152542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's quite hard to tell what's wrong without knowing anything more detailed about your data model, i.e. how the fields are related, and what their value type and range is. Also, please tell us what your expected result is (instead of just stating that it's wrong).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you maybe post a small sample app that demonstrate your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Apr 2013 23:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429510#M1152542</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-04-07T23:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429511#M1152543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take set analysis it may go well!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 06:05:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429511#M1152543</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2013-04-08T06:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429512#M1152544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your post suggests that you need num(AMEnd) and num(AMStart)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 11:10:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429512#M1152544</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2013-04-08T11:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429513#M1152545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is the repetitions of rows in another tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(distinct &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;AMEnd&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;numTime&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt; &amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;AMStart&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;,1,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and compare results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 17:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429513#M1152545</guid>
      <dc:creator>eddysanchez</dc:creator>
      <dc:date>2013-04-08T17:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429514#M1152546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that in the table i attached there is 2 columns AMShift and PMShift to show if the formula uses those values for calculation and it does, but the result i get (surveys done in AM shift)&amp;nbsp; is more than the number of surveys done at that location. so when i substitute in formula with the original value it works, so there is something about AMShift and PMShift which is wrong !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 05:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429514#M1152546</guid>
      <dc:creator />
      <dc:date>2013-04-09T05:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429515#M1152547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is taking long and no solution till now !!! For the morning shift i put numbers so it work, but what if i use AMStart and AMEnd. Note that each location have its own AMStart and AMEnd. I also attached the data model for reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429515#M1152547</guid>
      <dc:creator />
      <dc:date>2013-04-15T17:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429516#M1152548</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =sum(aggr( IF(numTime &amp;gt;= AMStart&amp;nbsp; and numTime &amp;lt;= AMEnd ,1,0),numTime,Locations))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have a look at the attached example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429516#M1152548</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-04-15T18:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429517#M1152549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great thanks dude. Could you just explain what was wrong and how does this code solve the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Bilal El-Abd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 21:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429517#M1152549</guid>
      <dc:creator />
      <dc:date>2013-04-15T21:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issue</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429518#M1152550</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The thing is there was so many numValue for each of the locations, thus it was necessory to calculate the expression for each values, and thus i have used aggr function at location and numValue level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 06:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-issue/m-p/429518#M1152550</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-04-16T06:01:48Z</dc:date>
    </item>
  </channel>
</rss>

