<?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: Previous month compared to this month till todays date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390064#M490482</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thijmen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it's best practice to create this kind of fields in the script, the following should work for previous month to date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_134969023205256" jivemacro_uid="_134969023205256"&gt;&lt;P&gt;Sum({&amp;lt; Date = {"=InMonthToDate(Date, Today(), -1)"} &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2012 09:58:39 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2012-10-08T09:58:39Z</dc:date>
    <item>
      <title>Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390063#M490481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear members,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my qlikview file i am looking for an expression which can visualise my growth rate by defiding this months sales till today (for instance 8 okt) by last months sales till todays day. (so for instance (sales from 01-october till today)/(sales from 01-sept till todays day(8)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem to figure it out!&amp;nbsp; =sum({&amp;lt;.........................&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 09:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390063#M490481</guid>
      <dc:creator />
      <dc:date>2012-10-08T09:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390064#M490482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thijmen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it's best practice to create this kind of fields in the script, the following should work for previous month to date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_134969023205256" jivemacro_uid="_134969023205256"&gt;&lt;P&gt;Sum({&amp;lt; Date = {"=InMonthToDate(Date, Today(), -1)"} &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 09:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390064#M490482</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-10-08T09:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390065#M490483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, the expression seems to work, but i do not get the answer i want.&lt;/P&gt;&lt;P&gt;I used your expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=Sum({&amp;lt; Date = {"=InMonthToDate(Date, Today&lt;STRONG&gt;(), 0)"} &lt;/STRONG&gt;&amp;gt;} Sales)/&lt;CODE class="jive-code"&gt;Sum({&amp;lt; Date = {"=InMonthToDate(Date, Today(), -1)"} &amp;gt;} Sales)&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;hoping to defide this month till date by last month. It returns exactly 1.000 which is allmost impossible!&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;Did i do wrong changing the -1 to 0?&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;Thank you!&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;/CODE&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 10:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390065#M490483</guid>
      <dc:creator />
      <dc:date>2012-10-08T10:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390066#M490484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has been my fault, sorry. Check the following expression that is shown in the attached application:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13496922797143719" jivemacro_uid="_13496922797143719"&gt;&lt;P&gt;Sum({&amp;lt; DateField = {"=InMonthToDate(DateField, Today(), 0)"} &amp;gt;} Sales) // current month&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DateField = {"=InMonthToDate(DateField, AddYears(Today(), -1), 0)"} &amp;gt;} Sales) // LY month to date&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 10:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390066#M490484</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-10-08T10:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390067#M490485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i see that this expression uses AddYears, can i just change it to AddMonths?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean to see the difference in months, in other words, how much more sales do i have this month compared to the last month. Since the data is useless it has to be for instance september till the 8th compared to october till the 8th.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 11:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390067#M490485</guid>
      <dc:creator />
      <dc:date>2012-10-08T11:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390068#M490486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used this expression to try it, but it doesn't seem to work. (no data displayed in a gauge chart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=InMonthToDate(date, Today(), 0)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cdr_totalamount_ex_vat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=InMonthToDate(date, AddMonths(Today(), -1), 0)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cdr_totalamount_ex_vat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 11:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390068#M490486</guid>
      <dc:creator />
      <dc:date>2012-10-08T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390069#M490487</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;Are there any other fields linked to date (such as month, year etc)? You may need to exclude them in the set expression, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt; Date = {"=InMonthToDate(Date, Today(), 0)"}, &lt;STRONG&gt;year=, month=&lt;/STRONG&gt; &amp;gt;} Sales) / Sum({&amp;lt;Date = {"=InMonthToDate(Date, Today(), -1)"}, &lt;STRONG&gt;year=, month=&lt;/STRONG&gt; &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rename as required. Include any other fields linked to date.&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, 08 Oct 2012 11:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390069#M490487</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-10-08T11:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390070#M490488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the field Date or date? QV field names are case sensitive, if you use the wrong fieldname (ie incorrect capitalisation), then QV will ignore the set expression and you will be computing Sum(Sales)/Sum(Sales) = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 11:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390070#M490488</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-10-08T11:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390071#M490489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot use the 'year=' and month= in my set expression right? because when i do the expression will be wrong next month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not totally get bot of your answers. Why are there two parts with inmonthtodate? One part of the expression should just be "sum(sales)" right, as there is no data after today so it does not have to be defined. Now i just need "sum(sales) previous month to todays day number" so how do you define the time set as &lt;/P&gt;&lt;P&gt;month=previous, day=todays day number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought this was not a difficult thing to do but in qlikview appearantly it is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 11:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390071#M490489</guid>
      <dc:creator />
      <dc:date>2012-10-08T11:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390072#M490490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thijmen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That function was to compare with previous year but the same month. Use this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_134969982963792" jivemacro_uid="_134969982963792"&gt;&lt;P&gt;Sum({&amp;lt; DateField = {"=InMonthToDate(DateField, Today(), -1)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DateField = {"=InMonthToDate(DateField, Today(), 0)"} &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 12:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390072#M490490</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-10-08T12:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month compared to this month till todays date</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390073#M490491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that it was not working because the automated process of retrieving data stopped in septembre, therefore there was no data in october!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last expression you send was correct and shall work when the data set is complete!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:50:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-month-compared-to-this-month-till-todays-date/m-p/390073#M490491</guid>
      <dc:creator />
      <dc:date>2012-10-08T13:50:55Z</dc:date>
    </item>
  </channel>
</rss>

