Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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;
See here for one approach: Calendar with AsOf Flags, Compare Easter to Easter
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