<?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: Aggregate figures by month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731348#M261927</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; Then you will have to use the max instead of sum.&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>Thu, 07 Aug 2014 08:35:52 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2014-08-07T08:35:52Z</dc:date>
    <item>
      <title>Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731345#M261924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in all of my apps I have one chart with shows the presence_quota, based on figures from our personell_database.&lt;/P&gt;&lt;P&gt;- There is a binary field (0 or 1) for every employee who is associated with a certain area;&lt;/P&gt;&lt;P&gt;- By just summing up that field, I get the correct nr. of employees every day.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; The problem is when I change the dimension from "day" to "month" (a standard feature of all my charts) and thus I need to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aggregate the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Currently I have the following formula:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; &lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;%Datum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;"$(= '&amp;lt;' &amp;amp; DATE(Today()))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Anz_MA_soll&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Monat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&amp;nbsp; &lt;/SPAN&gt; &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;(I don't want this data for "Today" because other data is not yet available, so it would not match and result in incorrect figures)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That, however, gives me gigantic figures. I just tried out dividing it by 28 - roughly the nr. of days in a month - and that results in plausible figures.&lt;/P&gt;&lt;P&gt;The issue - and the question - is, how can I build that into the expression since every month has a different nr. of days (and, even more so, working_days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 08:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731345#M261924</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-08-07T08:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731346#M261925</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; You can create an inline table with months and days, just like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * inline [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, Days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan, 31&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb, 28&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; March, 31&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now link this table with your Month Fields in the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In chart if you have the month as dimension, you can directly divide it by days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Monat)/Sum(Distinct Days)&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>Thu, 07 Aug 2014 08:25:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731346#M261925</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2014-08-07T08:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731347#M261926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a master_calendar with two fields which could be of use here:&lt;/P&gt;&lt;P&gt;- "Monatstag" (day_of_month) - that goes up from 1 to whatever, it is 7 for today&lt;/P&gt;&lt;P&gt;- "Monatstage" (days_in_month) - that is 31 for today&lt;/P&gt;&lt;P&gt;Could I use those? - keeping in mind that the aggregated figure for August is already on display today, but dividing by 31 would result in minuscule figures, of course...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 08:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731347#M261926</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-08-07T08:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731348#M261927</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; Then you will have to use the max instead of sum.&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>Thu, 07 Aug 2014 08:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731348#M261927</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2014-08-07T08:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731349#M261928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just realized that is not quite going to work - the field "Monatstag" is a static field, not a function - so that only works with one day selected. Well, I can calculate it, it's just for the current month.&lt;/P&gt;&lt;P&gt;What do you mean with using max instead of sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moritz &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 08:59:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731349#M261928</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-08-07T08:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731350#M261929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean, in the expression which i had suggested, use the Max(Distinct Day) instead of Sum.&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>Thu, 07 Aug 2014 09:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731350#M261929</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2014-08-07T09:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate figures by month</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731351#M261930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand - never mind. I made it now, I think - for all the past months, the field from my master_calendar is good. The challenge is only the current month - and there I can use&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; (num(Today() - Monthstart(Today()))+1) &amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;That will give me a 7 for today, for example, and so the figure is plausible - I'd say it is correct, namely 35, about the same that I have in the other view, with the dimension "day".&lt;/P&gt;&lt;P&gt;I will close the thread.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:19:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-figures-by-month/m-p/731351#M261930</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-08-07T09:19:13Z</dc:date>
    </item>
  </channel>
</rss>

