<?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 YTD / Point in Time / Variable Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899183#M312810</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 a question about point in time reporting/YTD/variable date. (if it's right to name so!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set up a dashboard with "traditional" KPI (for example, SALES YTD, OPEN ORDER, etc...).&lt;/P&gt;&lt;P&gt;The SALES YTD is calculated between all sales of current year (2015) and previous year YTD (obviously)&lt;/P&gt;&lt;P&gt;-&amp;gt; more or less... sum({&amp;lt;Date={"&amp;lt;=AddYears(Today(), -1)"}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then my boss asked me...I would like to know the "YESTERDAY SITUATION", which could means yesterday or 1 years ago...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I modify the expression?&lt;/P&gt;&lt;P&gt;Should I introduce a new variable, "Analysis Date" and recalculate all the date depending on that variable?&lt;/P&gt;&lt;P&gt;Or is there a better solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More generally, which is the best way to analyze the "past situation" with Qlikview?&lt;/P&gt;&lt;P&gt;I mean, if I have data until today (13 &lt;STRONG style="text-decoration: underline;"&gt;APR&lt;/STRONG&gt; 2015), how can ignore part of them and have the situation updated on (for example) 13 &lt;STRONG style="text-decoration: underline;"&gt;MAR&lt;/STRONG&gt; 2015?&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, 13 Apr 2015 06:35:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-13T06:35:06Z</dc:date>
    <item>
      <title>YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899183#M312810</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 a question about point in time reporting/YTD/variable date. (if it's right to name so!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set up a dashboard with "traditional" KPI (for example, SALES YTD, OPEN ORDER, etc...).&lt;/P&gt;&lt;P&gt;The SALES YTD is calculated between all sales of current year (2015) and previous year YTD (obviously)&lt;/P&gt;&lt;P&gt;-&amp;gt; more or less... sum({&amp;lt;Date={"&amp;lt;=AddYears(Today(), -1)"}&amp;gt;} sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then my boss asked me...I would like to know the "YESTERDAY SITUATION", which could means yesterday or 1 years ago...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I modify the expression?&lt;/P&gt;&lt;P&gt;Should I introduce a new variable, "Analysis Date" and recalculate all the date depending on that variable?&lt;/P&gt;&lt;P&gt;Or is there a better solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More generally, which is the best way to analyze the "past situation" with Qlikview?&lt;/P&gt;&lt;P&gt;I mean, if I have data until today (13 &lt;STRONG style="text-decoration: underline;"&gt;APR&lt;/STRONG&gt; 2015), how can ignore part of them and have the situation updated on (for example) 13 &lt;STRONG style="text-decoration: underline;"&gt;MAR&lt;/STRONG&gt; 2015?&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, 13 Apr 2015 06:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899183#M312810</guid>
      <dc:creator />
      <dc:date>2015-04-13T06:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899184#M312811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use Max(Date) instead of Today().&lt;/P&gt;&lt;P&gt;Consider that you have Date Field and you also have Year, Quarter, Month, Week, MonthYear calculated from this Date field. You want YTD based on the Date selected by user..&lt;/P&gt;&lt;P&gt;If user select 01/03/2015, you want YTD 01/01/2015 to 01/03/2015 and LYTD 01/01/2014 to 01/03/2014... You can achieve this by below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year=, Quarter=, Month=, Week=, MonthYear=, &lt;/SPAN&gt;Date = {"&amp;gt;=$(=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;YearStart(Max(Date))&lt;/SPAN&gt;)&amp;lt;=$(=Max(Date))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LYTD&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;SUM({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year=, Quarter=, Month=, Week=, MonthYear=, &lt;/SPAN&gt;Date = {"&amp;gt;=$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=YearStart(Max(Date),-1)&lt;/SPAN&gt;)&amp;lt;=$(=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;AddYears(Max(Date),-1)&lt;/SPAN&gt;)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Selected Date&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;SUM({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year=, Quarter=, Month=, Week=, MonthYear=, &lt;/SPAN&gt;Date = {"$(=Max(Date))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Last Year Same Date&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;SUM({$&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year=, Quarter=, Month=, Week=, MonthYear=, &lt;/SPAN&gt;Date = {'$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=AddYears(Max(Date),-1)&lt;/SPAN&gt;)'}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 06:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899184#M312811</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-04-13T06:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899185#M312812</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;For previous month from today calculate like below,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({&amp;lt;Date={"$(=addmonths(today(),-1))"}&amp;gt;} sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Please clarify on which range data you need to show in report ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 06:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899185#M312812</guid>
      <dc:creator />
      <dc:date>2015-04-13T06:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899186#M312813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you suggest to not use a variable but use the date selected by the user, right?&lt;/P&gt;&lt;P&gt;The last expression is LYTD on Selected Date, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know any post or article which I could refer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 07:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899186#M312813</guid>
      <dc:creator />
      <dc:date>2015-04-13T07:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899187#M312814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Harshal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I don't know in advance the data range.&lt;/P&gt;&lt;P&gt;I would like to give the possibility to user to define the date of the analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 07:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899187#M312814</guid>
      <dc:creator />
      <dc:date>2015-04-13T07:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899188#M312815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a variable and use them.. I generally use this set analysis without variable because you are not going to change the expression... &lt;/P&gt;&lt;P&gt;i.e. YTD and LYTD is going to remain the same based on Max(Date) selected by user, so there would be no difference if you use Variable or not...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 07:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899188#M312815</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-04-13T07:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899189#M312816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is the case you can calculate like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD&lt;/P&gt;&lt;P&gt;create variable : &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vMaxDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; sum( {&amp;lt;CalDate = {"&amp;gt;=$(= Date (min( {&amp;lt;CalMonth=, CalYear=, CalQuarter=&amp;gt;} QuaterStartDate )))&amp;lt;=$(vMaxDate))" }, CalYear=, CalMonth=, CalQuarter= &amp;gt;} Sales)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-or-&lt;/P&gt;&lt;P&gt;Year to Year&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CalDate = {"&amp;gt;=$(=Date(Yearstart(max(CalDate))))&amp;lt;=$(=max(CalDate))"},CalMonth=,CalQuarter=&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;-or-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LY YTD&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CalDate = {"&amp;gt;=$(=date(yearstart(Max(CalDate),-1)))&amp;lt;=$(=Date(ceil(addyears(Max(CalDate)+1,-1))))"},CalYear=&amp;gt;}Sales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 07:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899189#M312816</guid>
      <dc:creator />
      <dc:date>2015-04-13T07:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: YTD / Point in Time / Variable Date</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899190#M312817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Manish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression "Year=, Quarter=, Month=, Week=, MonthYear=," is to ignore the selections made by the users in that fields, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 06:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Point-in-Time-Variable-Date/m-p/899190#M312817</guid>
      <dc:creator />
      <dc:date>2015-04-15T06:40:16Z</dc:date>
    </item>
  </channel>
</rss>

