Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating field for fiscial year between dates- qlik sense script

Hi,

I would like to :

We have a createdon date.Now,

create a string field i.e. fiscalyear in the load statement

create start and end date based on hard code dates.

use conditional statement , if createddate lies between the start and end date then assign the fiscialyear field to some string value..


e.g.


LOAD

date(2011-04-01, "YYYY-MM-DD") As datestarst;

date(2012-03-31, "YYYY-MM-DD") As dateends;

Fiscalyear  As fy_year

LOAD *inline [

Fiscalyear

FY11

FY12

FY13

FY14

FY15

];

LOAD CreatedOn as CampaignCreatedOn,

If (CampaignCreatedOn) >= (datestarst)

&

If(CampaignCreatedOn) <= (datestarst)

fy_year = "FY11"




wondered if its possible or ??


thx-Irf

1 Reply
jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this link

Fiscal and Standard Calendar generation

Regards,

jagan.