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: 
itatspectrum
Partner - Contributor II
Partner - Contributor II

inyeartodate with Date not Month Flag as start of Year.

Hi All,

I have a company that for commercial reasons has their Sales year starting on 26/12 every year.

I tend to use the following to create my YTD/LYTD flags but I need to replace the Start Month parameter with a specific date?

if(year2date(Inv_Date,0,12),1,Null()) as  Inv_YTD,                                                 
if(year2date(Inv_Date,-1,12),1,Null()) as  Inv_LYTD,


Any ideas anyone?


Cheers


Steve

2 Replies
sunny_talwar

How about this

If(YearToDate(Inv_Date-26, 0, 12), 1, Null()) as  Inv_YTD,                                                 

If(YearToDate(Inv_Date-26, -1, 12), 1, Null()) as  Inv_LYTD,

nawfal_bouharat
Contributor
Contributor

Hi ,

Im trying to count specific cells in Qlicksense and to compare them based on the same day one year ago.

=Count({$<[ORDER_DATE.autoCalendar.Year]+={2017}>}COMMISSION)

This is until where I could go. My cell (ORDER_DATE) is transferred with the autocalender to YEAR. so I can count on values containing 2017 and 2016 to compare the whole year. Good for December but not so good for januari. I see that there is a Function Year2Date but I cannot find the way to insert it.

Could anyone help ?