<?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: Problem with dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277844#M1197256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; In your load script identify the day of the month somewhere in your tables (1-31) and the name of the month (Jan-Dec) then add those fields into a listbox or multi-box which the users can use to select a specific month or day to compare year over year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load SalesDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(SalesDate) as SalesYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quarter(SalesDate) as SalesQtr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(SalesDate) as SalesMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekday(SalesDate) as SalesDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; day(SalesDate) as SalesDayNum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Putting all of the above fields into listbox's will allow the users to compare virtually any year over year period they wish. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then change the set statement from earlier to read &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;SUM﻿&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;SalesYear&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(SalesYear))-1)&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG style="color: #000000;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;SUM﻿&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;SalesYear&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(SalesYear)))&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a user selects 2009 from the SalesYear listbox, the formulas will look at 2008 &amp;amp; 2009.&lt;/P&gt;&lt;P&gt;When they then select 2 from the SalesQtr listbox the formulas will compare Q2 2008 to Q2 2009...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jun 2011 21:04:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-09T21:04:38Z</dc:date>
    <item>
      <title>Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277839#M1197251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well first of all, sorry for my english it's out of practice, second, i have a litle problem, i have a date for example 09/06/2011 and i want to sum all the sales between the fitst of january to this date and do that for every year and month that i select, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i have selected june 2011 i have to obtain de sum of january 2011 to&amp;nbsp; june 2011 and if i select march obtain de sum of janury 2011 to&amp;nbsp; march 2011 and obtain the same for 2010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don´t know of i'm clear but that´s my question and i hope that some one can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 17:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277839#M1197251</guid>
      <dc:creator />
      <dc:date>2011-06-09T17:46:25Z</dc:date>
    </item>
    <item>
      <title>Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277840#M1197252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set analysis statement like the one below should help you in this situation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #808080;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #808080;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SUM &lt;/P&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Fiscal_Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(Fiscal_Year)))&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 18:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277840#M1197252</guid>
      <dc:creator />
      <dc:date>2011-06-09T18:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277841#M1197253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;correct me if i'm wrong but that only helps me in the current year, what if i wanth a comparation in the same period of months but for the last year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 19:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277841#M1197253</guid>
      <dc:creator />
      <dc:date>2011-06-09T19:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277842#M1197254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use something like the following to get previous years:&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SUM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Fiscal_Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(Fiscal_Year))-1)&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add month &amp;amp; date selection box's and you can compare as many different time periods as needed. &lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;So if you select 2010 as your current Fiscal_Year, the above statement will display data for 2009. If you have no Fiscal_Year selected it will use max - 1, or 2010. &lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿Further you can combine them in your expression to just show you the change:&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;/P&gt;SUM&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Fiscal_Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(Fiscal_Year)))&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG style="color: #000000;"&gt;﻿&lt;/STRONG&gt;&lt;/SPAN&gt;-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;SUM﻿&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Fiscal_Year&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(Fiscal_Year))-1)&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 20:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277842#M1197254</guid>
      <dc:creator />
      <dc:date>2011-06-09T20:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277843#M1197255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you, you help me alot to clear that out. one last question if i want to do that but including de days not only the months?, i mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;09/06/2011, 09/06/2010&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 20:40:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277843#M1197255</guid>
      <dc:creator />
      <dc:date>2011-06-09T20:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277844#M1197256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; In your load script identify the day of the month somewhere in your tables (1-31) and the name of the month (Jan-Dec) then add those fields into a listbox or multi-box which the users can use to select a specific month or day to compare year over year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load SalesDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year(SalesDate) as SalesYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quarter(SalesDate) as SalesQtr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(SalesDate) as SalesMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weekday(SalesDate) as SalesDay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; day(SalesDate) as SalesDayNum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;From Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Putting all of the above fields into listbox's will allow the users to compare virtually any year over year period they wish. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then change the set statement from earlier to read &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;SUM﻿&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;SalesYear&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(SalesYear))-1)&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG style="color: #000000;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;SUM﻿&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;SalesYear&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(=max(year(SalesYear)))&lt;/EM&gt;&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a user selects 2009 from the SalesYear listbox, the formulas will look at 2008 &amp;amp; 2009.&lt;/P&gt;&lt;P&gt;When they then select 2 from the SalesQtr listbox the formulas will compare Q2 2008 to Q2 2009...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 21:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277844#M1197256</guid>
      <dc:creator />
      <dc:date>2011-06-09T21:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with dates</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277845#M1197257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you man. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 21:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-dates/m-p/277845#M1197257</guid>
      <dc:creator />
      <dc:date>2011-06-09T21:41:05Z</dc:date>
    </item>
  </channel>
</rss>

