7 Replies Latest reply: Jun 19, 2012 10:52 AM by Jeeva Guru

# How to Achieve Year to Date(YTD) in qlikview?

Hi,

How to achieve Year to Date (YTD) in Qlikview?

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Not sure what you mean but anyway :

YearStart(Today()) & '-' & Today()

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Hi Giakoum,

I hav data for datewise & monthwise, want to sum it as Yearwise(YTD) & Monthwise(MTD). Is it possible to achieve it in Qlikview?

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Yes it is, but please provide sample data.

BR, giakoum

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Take a look at the calendars provided by http://qlikviewcomponents.org. The Calendars create Set expressions that correspond to YTD, PreviousYTD, etc. See also:

http://qlikviewnotes.blogspot.com/2012/01/easy-period-analysis-using-qlikview.html

-Rob

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Hi Giakoum,

Its Just Normal Date & Month column with its Description and one sales value column. I hav Datewise data - Want to convert it to year wise and Monthwise as sum. Could u suggest me any idea to achieve this in QV?

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Hi,

there are two methods->

1. Dynamic YTD( we have to select a year and a month dynamically)

create variables  vDynamicCY= [Year] , vDynamicCM= num([Month])

then put the expression:

=sum({\$<Year = {\$(vDynamicCY)}, Month = {"<=\$(vDynamicCM)"}>} Amount)

2. Static YTD(it will automatically take year n month)

create variables  vStaticCY= year(today()), vStaticM= num(month(today()))

=sum({\$<Year = {\$(vStaticCY)}, Month = {"<=\$(vStaticM)"}>} LineSalesAmount)

Regards

Apurva

• ###### Re: How to Achieve Year to Date(YTD) in qlikview?

Hi Apurva,

Thanks for ur reply. Is this any function to achieve this as standard? or shall we create it as manual? I didnt hav knowledge on Variables in QV. Is there any manuals avail for variables & functions in QV?