Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pirotfab
Creator
Creator

Calendar and holidays

Hello,

I create my schedule directly in QlikView

How do you deal holidays in Qlikview?

In the script? In Expressions?

I want to get in a text box the number of days based on two different dates.

Thanks

Best regards

5 Replies
sunny_talwar

Do you have a list of days in an excel file? May be add them via Excel and create a variable in the script and then use the variable on the front end of the application

pirotfab
Creator
Creator
Author

Sunny,

I have au list in an excel file.

How create a variable with an excel file in the script ?

I use this expression NetWorkDay() in the script or in the box text ? what is the best ?

Thanks

florentina_doga
Partner - Creator III
Partner - Creator III

try this

//citesc fisierul cu sarbatorile legale

sarbatori_t:

LOAD * inline [sarbatori

1/1/2016

8/15/2016]

;

//concatenez toate sarbatorile legale

NoConcatenate

sarbatori:

load

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

resident sarbatori_t;

drop table sarbatori_t;

//creez o variabila cu toate sarbatorile legale concatenate

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

drop table sarbatori;

//creez o tabela de timeline incepand cu 1/1/2014 pana la sfarsitul lunii curente

TempCalendar:

LOAD

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

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

//la tabela de timeline adaus anul, luna si daca ziua respectiva este lucratoare sau nu (aici tinem cont si de sarbatorile legale)

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;

Gysbert_Wassenaar

See here for one approach: Calendar with AsOf Flags, Compare Easter to Easter


talk is cheap, supply exceeds demand
pirotfab
Creator
Creator
Author

Thanks,

It's interesting but i don't understand ... it's dificult for me.

I don't work "an informatique" ...

If there are a simple thing ...

Thanks