Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there any options like YTD? (Year To Date)

In the Time dimension criteria, Is there any option like YTD? How to achieve it?

Regards,

Jeeva.

14 Replies
Not applicable
Author

YearToDate (timestamp [, year_offset=0 [, start_month = 1 [, ref_timestamp]]])

Should be more explanation in the help section.

Edit:

This returns a boolean for true or false. I believe that if you use:

if(YearToDate(datefield),datefield)

it should return data that is true for the yeartodate function

SunilChauhan
Champion
Champion

there any options like YTD? (Year To Date)

VmaxYear=Max(year field)

VmaxMonth=Max(month field in number)

sum(if( Year=$(VmaxYear) and Month<=$(VmaxMonth),Amount))

Sunil Chauhan
its_anandrjs

Hi,

Use Year to Date function like

YearToDate( date [ , yearoffset [ , firstmonth [ , todaydate] ] ] )

Regards

Anand

chriscammers
Partner - Specialist
Partner - Specialist

Are you looking to show measures like "Sales (YTD)"? If so I suggest you look at this thread. There are two approaches given which should help you achieve your goal. The first is a DIY solution helping you build the expressions required. The other is a more packaged solution that will also help.

Not applicable
Author

Dear all,

     My data is in Date level, I want that data in Year level for my Dashboard.This was my requirement. How to convert it in Qlikview side not in DB. Can anyone solve this?

Regards,

  Jeeva.

Not applicable
Author

Load

date,

year(date) as Year;

Select *

from ...;

Just create a preceding Load, and just use the format Year(date) to have it return just the year. Also works for Month(date) if you need just the month.

Not applicable
Author

YearToDate( date [ , yearoffset [ , firstmonth [ , todaydate] ] ] )

Returns true if a date falls within the year to date, else false. If none of the optional parameters are used, the year to date means any date within one calender year from January 1 up to and including the date of the last script execution.

Can Anyone explains this Function,  Year to date(Underlined) refers what?

Regards,

Jeeva.

chriscammers
Partner - Specialist
Partner - Specialist

So as it says the function returns true or false depending on if the "date" is within the Year to date.

There are some great settings to help you arrive at a wide array of different time preriods and fiscal calendars.

Year offset allows you to evaluate this year, last year, next year, "n" year. -1 will evaluate last year(2010)

First Month allows you to say what month marks the begining of the year depending on your fiscal calendar

Today Date the reference date for "today" the default is the last runtime of the script.

I would use this as part of a calendar dimension table to do something like this

If(Year2Date(CalendarDate,0,1,Today()),1,0) as InCurrentTYD

If(Year2Date(CalendarDate,-1,1,Today()),1,0) as InPriorTYD

I would then use these fields to multiply by my sales to show ytd and pytd sales

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi ,

I attached one example for YTD Calculation in qlikview side .check this file .

Regards ,

Perumal.A