<?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 divide month amount by days in month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208001#M63555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have amounts linked to the last day of each month, that I need to convert to a daily amount i.e. amount / days in month.&lt;/P&gt;&lt;P&gt;I've created a calendar so have all the days for each month and have the amount currently showing on the last day of each month, but how in an expression can I say the amount for last day divided by number of days in that month?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;BR /&gt;Phil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Apr 2010 12:59:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-08T12:59:45Z</dc:date>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208001#M63555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have amounts linked to the last day of each month, that I need to convert to a daily amount i.e. amount / days in month.&lt;/P&gt;&lt;P&gt;I've created a calendar so have all the days for each month and have the amount currently showing on the last day of each month, but how in an expression can I say the amount for last day divided by number of days in that month?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;BR /&gt;Phil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 12:59:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208001#M63555</guid>
      <dc:creator />
      <dc:date>2010-04-08T12:59:45Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208002#M63556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;you can use&lt;/P&gt;&lt;P&gt;fieldvaluecount('Days') to get the no of days in 'Days' field for a particular month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 13:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208002#M63556</guid>
      <dc:creator />
      <dc:date>2010-04-08T13:12:39Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208003#M63557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tauqueer,&lt;/P&gt;&lt;P&gt;Many thanks for the reply.&lt;/P&gt;&lt;P&gt;The problem isn't so much to do with getting the number of days, my data looks similar to this:&lt;/P&gt;&lt;P&gt;Date Amount&lt;/P&gt;&lt;P&gt;1/1/2010 0&lt;BR /&gt;2/1/2010 0&lt;BR /&gt;3/1/2010 0&lt;BR /&gt;[...]&lt;BR /&gt;31/1/2010 500&lt;/P&gt;&lt;P&gt;I want to get the 500 and divide by number of days in the month, so would need to show 500/31 for each day of Jan in this example.&lt;/P&gt;&lt;P&gt;Many thanks,&lt;BR /&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208003#M63557</guid>
      <dc:creator />
      <dc:date>2010-04-08T14:16:43Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208004#M63558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my expression for dividing the total by days in the month:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;=&lt;BR /&gt;sum(if(AimMths&amp;gt;0 And AimMths&amp;lt;4,PRIRENT+PRIDEPN+NON_INS_INC/(monthend(DUEDATE)-monthstart(DUEDATE)),0))&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Though I get the correct number it only shows this value on the last day of the month, but I need to show this amount for each day of the month.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208004#M63558</guid>
      <dc:creator />
      <dc:date>2010-04-08T14:23:21Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208005#M63559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;what you can do is that write&lt;/P&gt;&lt;P&gt;load day(Date) as days&lt;/P&gt;&lt;P&gt;in your script&lt;/P&gt;&lt;P&gt;and then instead of monthend(DUEDATE)-monthstart(DUEDATE)&lt;/P&gt;&lt;P&gt;use fieldvaluecount( ' days ') in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208005#M63559</guid>
      <dc:creator />
      <dc:date>2010-04-08T14:34:40Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208006#M63560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tauqueer,&lt;/P&gt;&lt;P&gt;Sorry I'm fairly new to Qlik and I'm not sure how that displays the amount for each day? I.E. not the day number but the total amount for the month (which is currently only shown on the last day) divided by the number of days for each month (which I have now... calculated in the LOAD for the calendar table)&lt;/P&gt;&lt;P&gt;I'm trying to use the aggr function, to get the total for the month then divide that by the number of days... without much luck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208006#M63560</guid>
      <dc:creator />
      <dc:date>2010-04-08T14:58:31Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208007#M63561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;can you attach your application here so that i can get a clear picture of what exactly you need .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 15:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208007#M63561</guid>
      <dc:creator />
      <dc:date>2010-04-08T15:34:26Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208008#M63562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tauqueer,&lt;/P&gt;&lt;P&gt;I've attached a sample to show the result I'm trying to achieve.&lt;/P&gt;&lt;P&gt;Many thanks for your help with this.&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 16:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208008#M63562</guid>
      <dc:creator />
      <dc:date>2010-04-08T16:09:51Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208009#M63563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Phil,&lt;/P&gt;&lt;P&gt;Did you find a solution for your problem?&lt;/P&gt;&lt;P&gt;I've got a same thing going on.&lt;/P&gt;&lt;P&gt;Greetz,&lt;/P&gt;&lt;P&gt;Halmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 07:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208009#M63563</guid>
      <dc:creator />
      <dc:date>2010-05-11T07:45:03Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208010#M63564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Halmar,&lt;/P&gt;&lt;P&gt;I kind of got there, though didn't go down this route in the end.&lt;/P&gt;&lt;P&gt;I've attached a sample qvw, if you look at the load script I bring in the daily amounts which are 0 apart from the last day of the month, then I create a couple of fields in the load and use these in the qvw expressions.&lt;/P&gt;&lt;P&gt;Hopefully it's pretty easy to follow what I've done, anyway have a look and hope the attached helps.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 09:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208010#M63564</guid>
      <dc:creator />
      <dc:date>2010-05-11T09:30:56Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208011#M63565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;I Change little bit your code. Hope this give you the result you want.&lt;/P&gt;&lt;P&gt;Normal 0 21 false false false FI X-NONE X-NONE MicrosoftInternetExplorer4&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR style="margin-bottom:0.0001pt;line-height:normal;" /&gt;data:&lt;BR style="margin-bottom:0.0001pt;line-height:normal;" /&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Day, Amount&lt;BR /&gt;01/01/2010,0&lt;BR /&gt;02/01/2010,0&lt;BR /&gt;……&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;EndDays:&lt;BR /&gt;LOAD&lt;BR /&gt; Date(Monthend(Day),'DD/MM/YYYY') as MonthEnd,&lt;BR /&gt; Amount as EndAmount&lt;BR /&gt;Resident data where Amount&amp;gt;0 and not Isnull(Amount);&lt;BR /&gt;&lt;BR /&gt;AllDays:&lt;BR /&gt;LOAD&lt;BR /&gt; Date(Monthend(Day),'DD/MM/YYYY') as MonthEnd,&lt;BR /&gt; Month(Day) &amp;amp; Year(Day) As MthYr,&lt;BR /&gt; Date(Day,'DD/MM/YYYY') as Day&lt;BR /&gt;RESIDENT data;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Daily_Amount:&lt;BR /&gt;JOIN&lt;BR /&gt;LOAD MonthEnd,&lt;BR /&gt; Day(MonthEnd) as NoDays,&lt;BR /&gt; // EndAmount ,&lt;BR /&gt; Num(EndAmount/Day(MonthEnd)) as [Daily Amount]&lt;BR /&gt;RESIDENT EndDays;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE data;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;/P&gt;&lt;P style="margin-bottom:0.0001pt;line-height:normal;"&gt;Anni&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 12:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208011#M63565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-11T12:13:04Z</dc:date>
    </item>
    <item>
      <title>divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208012#M63566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anni,&lt;/P&gt;&lt;P&gt;Many thanks for that, calculating the monthly amount in the load is a much better solution for me.&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;BR /&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 14:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208012#M63566</guid>
      <dc:creator />
      <dc:date>2010-05-11T14:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208013#M63567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I saw this and did try to do exactly the same but found these solutions a bit to advanced. &lt;/P&gt;&lt;P&gt;I just created a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET MaxDaysInMonth =Day(monthend (Today()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this variable will always show the number of days in the month you are in right now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 12:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208013#M63567</guid>
      <dc:creator />
      <dc:date>2012-07-12T12:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: divide month amount by days in month</title>
      <link>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208014#M63568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the script like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MasterCalendar :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(OrderDate) AS OrderDay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In FirstChart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Propertities ---&amp;gt; Dimension---&amp;gt; Secor, OrderDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enable the option of Suppress when value is null you will get the remove the 'Zero' value from chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Amount) / Count(Distinct OrderDay)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Iyyappan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 14:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/divide-month-amount-by-days-in-month/m-p/208014#M63568</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2012-07-12T14:28:41Z</dc:date>
    </item>
  </channel>
</rss>

