Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

Hi,

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

7 Replies
giakoum
Partner - Master II
Partner - Master II

Not sure what you mean but anyway :

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

Not applicable
Author

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?

giakoum
Partner - Master II
Partner - Master II

Yes it is, but please provide sample data.

BR, giakoum

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

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

Not applicable
Author

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?

Not applicable
Author

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?