<?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: Weird aggr function behavior in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917496#M318059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I do. Actually I think I may have an error in my data, I have to check. Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Aug 2015 13:38:50 GMT</pubDate>
    <dc:creator>inescastelhano</dc:creator>
    <dc:date>2015-08-10T13:38:50Z</dc:date>
    <item>
      <title>Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917490#M318053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on some project, and I want the expression to return '01:00:00' if "Hour beginning"&amp;lt;8 and "Hour end"&amp;gt;8. Can't be done with an if condition because this expression will be part of a sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table, and my result is in the last column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95522_Capture.PNG" style="height: 237px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I have this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(sum({&amp;lt;[Hour A]={"&amp;lt;8"}, [Hour B]={"&amp;gt;8"}&amp;gt;} '01:00:00'), [ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why, but sometimes it randomly returns the wrong value... It was supposed to be '01:00:00' for all the table rows, but I randomly get other values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody have a clue on what to do with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ines&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 11:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917490#M318053</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-08-10T11:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917491#M318054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you add another expression to you chart: Count(ID) to check if 20019528 is occurring twice in your data by chance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 11:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917491#M318054</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-10T11:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917492#M318055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you have several records per ID value that meet those conditions. Try adding this expression to the chart to check: count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;[Hour A]={"&amp;lt;8"}, [Hour B]={"&amp;gt;8"}&amp;gt;}&lt;/SPAN&gt;[Hour A])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 11:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917492#M318055</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-10T11:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917493#M318056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Avg() instead of Sum():&lt;/P&gt;&lt;P&gt;aggr(avg({&amp;lt;[Hour A]={"&amp;lt;8"}, [Hour B]={"&amp;gt;8"}&amp;gt;} '01:00:00'), [ID])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 12:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917493#M318056</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-08-10T12:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917494#M318057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's correct. That was my mistake. Thanks for your help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 13:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917494#M318057</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-08-10T13:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917495#M318058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it solved the problem! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 13:38:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917495#M318058</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-08-10T13:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Weird aggr function behavior</title>
      <link>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917496#M318059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I do. Actually I think I may have an error in my data, I have to check. Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 13:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weird-aggr-function-behavior/m-p/917496#M318059</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-08-10T13:38:50Z</dc:date>
    </item>
  </channel>
</rss>

