Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pirotfab
Creator
Creator

Calendar and holidays

Hello,

I create a shedules in the script Qlikview.
How to deal holidays ? in the scipt ? in expressions

I want number of working day ?

Thanks
Best regards

1 Solution

Accepted Solutions
florentina_doga
Partner
Partner

try this

sarbatori_t:

LOAD * inline [sarbatori

1/1/2016

8/15/2016]

;

NoConcatenate

sarbatori:

load

    concat(distinct CHR(39)&sarbatori&CHR(39),',') as concat_sarbatori

resident sarbatori_t;

drop table sarbatori_t;

let v_sarbatori=peek('concat_sarbatori',0,'sarbatori');

drop table sarbatori;

TempCalendar:

LOAD

    date('1/1/2016' + rowno() - 1,'DD-MM-YYYY') AS DATA

AUTOGENERATE 1 While '1/1/2014' + rowno() - 1< yearend(today())-1;

NoConcatenate

pontaje_finale:

load

    *,   

    NetWorkDays(DATA,DATA,$(v_sarbatori)) as workday;

load

    *,

    month(DATA) as luna,

    year(DATA) as an,

       'S'&ceil(Month(date(DATA,'MMM-YY') )/6) as Semestru,

    Year(date(DATA,'MMM-YY') )&'-S'&ceil(Month(date(DATA,'MMM-YY') )/6) as An_Semestru,

    'Q'&ceil(Month(date(DATA,'MMM-YY') )/3) as Trimestru,

    dual(Year(date(DATA,'MMM-YY'))&'-Q'&ceil(Month(date(DATA,'MMM-YY'))/3),num(QuarterStart(date(DATA,'MMM-YY')))) as An_Trim,

    

    date(makedate(year(DATA),month(DATA),'01'),'MMM-YYYY')  as AnLuna,

    floor(monthstart(date(makedate(year(DATA),month(DATA),'01'),'MMM-YY')))  as AnLuna_today,

    'W'&week(date(DATA,'MMM-YY')) as Saptamana,

    dual (year(DATA) &'-w'& week(date(DATA,'MMM-YY')) ,    num(weekstart(date(DATA,'MMM-YY')))) as AnSapt

resident TempCalendar;

drop table TempCalendar;

View solution in original post

6 Replies
swuehl
MVP
MVP

And please don't post multiple times the same request, this makes it hard to follow a discussion:

Calendar and holidays

pirotfab
Creator
Creator
Author

yes it's a mistake !

pirotfab
Creator
Creator
Author

i 'll Watch the post.

Thanks for our reponses

florentina_doga
Partner
Partner

try this

sarbatori_t:

LOAD * inline [sarbatori

1/1/2016

8/15/2016]

;

NoConcatenate

sarbatori:

load

    concat(distinct CHR(39)&sarbatori&CHR(39),',') as concat_sarbatori

resident sarbatori_t;

drop table sarbatori_t;

let v_sarbatori=peek('concat_sarbatori',0,'sarbatori');

drop table sarbatori;

TempCalendar:

LOAD

    date('1/1/2016' + rowno() - 1,'DD-MM-YYYY') AS DATA

AUTOGENERATE 1 While '1/1/2014' + rowno() - 1< yearend(today())-1;

NoConcatenate

pontaje_finale:

load

    *,   

    NetWorkDays(DATA,DATA,$(v_sarbatori)) as workday;

load

    *,

    month(DATA) as luna,

    year(DATA) as an,

       'S'&ceil(Month(date(DATA,'MMM-YY') )/6) as Semestru,

    Year(date(DATA,'MMM-YY') )&'-S'&ceil(Month(date(DATA,'MMM-YY') )/6) as An_Semestru,

    'Q'&ceil(Month(date(DATA,'MMM-YY') )/3) as Trimestru,

    dual(Year(date(DATA,'MMM-YY'))&'-Q'&ceil(Month(date(DATA,'MMM-YY'))/3),num(QuarterStart(date(DATA,'MMM-YY')))) as An_Trim,

    

    date(makedate(year(DATA),month(DATA),'01'),'MMM-YYYY')  as AnLuna,

    floor(monthstart(date(makedate(year(DATA),month(DATA),'01'),'MMM-YY')))  as AnLuna_today,

    'W'&week(date(DATA,'MMM-YY')) as Saptamana,

    dual (year(DATA) &'-w'& week(date(DATA,'MMM-YY')) ,    num(weekstart(date(DATA,'MMM-YY')))) as AnSapt

resident TempCalendar;

drop table TempCalendar;

View solution in original post

pirotfab
Creator
Creator
Author

it works with your help florentina

Thanks you to all