<?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: Occupancy rate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421443#M567296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would probably also get the correct results if just removed the distinct from the count of KL_DATUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Dec 2012 13:42:58 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2012-12-10T13:42:58Z</dc:date>
    <item>
      <title>Occupancy rate</title>
      <link>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421440#M567289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello QVer,&lt;/P&gt;&lt;P&gt;I'm calculating occupancy rates of beds per day and then it is of interest to look over calendar weeks, months aso.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm showcasing two charts (straight table + bar chart):&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="26616" class="jive-image-thumbnail jive-image" onclick="" alt="qv_occupancy_121210.jpg" src="https://community.qlik.com/legacyfs/online/26616_qv_occupancy_121210.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Selected are two OEFA (AMED + BMED) and the calendar week = 2+3 (equal to 28 occupancy days). The OEFA can have varying assigned beds over time.&lt;/P&gt;&lt;P&gt;I'm using the same formula in both charts to calculate the weighted occupancy rate:&lt;/P&gt;&lt;P&gt;=sum(CASES/OEFA_BETT)/count(distinct KL_DATUM) &lt;/P&gt;&lt;P&gt;Straight table shows the cumulated rate (94,49%) of 28 day corresponding to 2.+3. calendar week.&lt;/P&gt;&lt;P&gt;In bar chart I want to have the cumulated rates of selected OEFA per selected week(s) which is&lt;/P&gt;&lt;P&gt;2. week = 93,64% instead of the summation of 187%&lt;/P&gt;&lt;P&gt;3. week = 95,34% instead of the summation of 191%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In practice I'm using a set formula and I tried a lot.&lt;/P&gt;&lt;P&gt;Can someone help please? Thanks.&lt;/P&gt;&lt;P&gt;dj_skbs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421440#M567289</guid>
      <dc:creator />
      <dc:date>2012-12-10T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Occupancy rate</title>
      <link>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421441#M567293</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;can you post your sample file ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421441#M567293</guid>
      <dc:creator />
      <dc:date>2012-12-10T13:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Occupancy rate</title>
      <link>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421442#M567294</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 think the problem is that OEFA is not a dimension in the bar chart. As far as I can see you have two records per day (one for AMED and one for BMED). To calculate the bar, you are dividing by distinct date, so for a week you would sum 14 records and diivide by 7, which results in 2x the correct amount which is what you are getting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick workaround would be to update the expression for the chart to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(CASES/OEFA_BETT) / count(distinct KL_DATUM) / count(distinct OEFA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421442#M567294</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-12-10T13:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Occupancy rate</title>
      <link>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421443#M567296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would probably also get the correct results if just removed the distinct from the count of KL_DATUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Occupancy-rate/m-p/421443#M567296</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-12-10T13:42:58Z</dc:date>
    </item>
  </channel>
</rss>

