<?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: Aggr Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524521#M195982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. I was able to get that same result, but as you said it only shows acuity 4. I am unable to figure out why that happens. I need it to stack all the acuities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In regard to the island calendar being used, I had to use this because I have too many calculations that use different dates, such as admit date, arrival date, discharge date, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree that stacking average may not make sense, but that is what the doctor wanted so I have to give them that. I appreciate the help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Dec 2013 17:02:53 GMT</pubDate>
    <dc:creator>tchovanec</dc:creator>
    <dc:date>2013-12-24T17:02:53Z</dc:date>
    <item>
      <title>Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524519#M195980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am trying to aggregate some data in a bar chart and it is not working the way I would expect it. I have attached the example application. You will notice that the straight table has a value of 6.5 for the average and the stacked bar chart is showing something completely different. I would like the stacked bar chart to also equal 6.5. It should be the average of all acuity levels. Any help would be greatly appreciated. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 16:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524519#M195980</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-12-24T16:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524520#M195981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you add the Start Time to the AGGR parameters you will arrive with a value of 6.5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG(AGGR(SUM(&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DEPARTMENT_ID = {1000}&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,StartDt = P(ISLAND_CAL.Date)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(floor(DTTM_PAT_ARR,1/24/60) &amp;gt;= floor(StartDTTM,1/24/60) AND floor(DTTM_PAT_ARR,1/24/60) &amp;lt;= floor(EndDTTM,1/24/60),COUNTER_CSN)&lt;/P&gt;&lt;P&gt;),EndDTTM,StartTime))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This only gives a value for Acuity Level 4 though.&amp;nbsp; I've not worked this back through to see why, but I suspect that there are issues in the data model.&amp;nbsp; Simplifying things as much as you can, using techniques such as ApplyMap will help.&amp;nbsp; Data islands always ring alarm bells, as they can cause things to go quite strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way to simulate what you will get from an AGGR statement is to create a chart with the dimensions matching your AGGR parameters, put the SUM statement as the Expression on the chart and set the Total Mode to Avg of Rows.&amp;nbsp; The dimensions in the table emulate what the parameters of the AGGR will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stacking averages in a Bar Chart doesn't make too much sense anyway - as the total of the segments is never going to be the total average.&amp;nbsp; You should perhaps stick to a single dimension on that chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 16:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524520#M195981</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2013-12-24T16:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524521#M195982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. I was able to get that same result, but as you said it only shows acuity 4. I am unable to figure out why that happens. I need it to stack all the acuities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In regard to the island calendar being used, I had to use this because I have too many calculations that use different dates, such as admit date, arrival date, discharge date, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree that stacking average may not make sense, but that is what the doctor wanted so I have to give them that. I appreciate the help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 17:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524521#M195982</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-12-24T17:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524522#M195983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the 6.5 you are targeting based on?&amp;nbsp; The values for each acuity are 27, 66, 60 and 53 - an average of 51.5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 17:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524522#M195983</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2013-12-24T17:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524523#M195984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 6.5 is the average number of arrivals for the days selected. The total arrived is 26 for the 4 days selected, so 26/4 = 6.5. They then would like to see that average 6.5 arrivals per day broken out by acuity and that is what I am trying to do. You will see that for acuity 2 there were 3 total, so an average of .75. Acuities 3 and 4 each had a total of 8, so the average would be 2. Does that help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 17:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524523#M195984</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-12-24T17:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524524#M195985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG(AGGR( count(&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DEPARTMENT_ID = {1000}&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,StartDt = P(ISLAND_CAL.Date)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(floor(DTTM_PAT_ARR,1/24/60) &amp;gt;= floor(StartDTTM,1/24/60) AND floor(DTTM_PAT_ARR,1/24/60) &amp;lt;= floor(EndDTTM,1/24/60),DTTM_PAT_ARR)&lt;/P&gt;&lt;P&gt;),EndDTTM,ACUITY_LEVEL_C))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 18:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524524#M195985</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-24T18:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524525#M195986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That being the case, do you need to remove the date from the dimension list&lt;/P&gt;&lt;P&gt;in the chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Dec 2013 08:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function/m-p/524525#M195986</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2013-12-25T08:15:39Z</dc:date>
    </item>
  </channel>
</rss>

