Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I need to put a month to month year prior comparrison for the vColli dimension at my client's company. this is the master calendar they built before my time:
min_max:
Load
min(%Kalender) as minDate,
max(%Kalender) as maxDate
Resident Picking;
Let vMinDate = Peek('minDate', 0, 'min_max')-1;
Let vMaxDate = Peek('maxDate', 0, 'min_max');
Let vGenerate = round(Peek('maxDate', 0, 'min_max') - $(vMinDate));
DROP Table min_max;
Kalender:
Load *,
TempDate AS %Kalender,
Year(TempDate)&Ceil (Month(TempDate)/3) as JaarKwartaal,
date(TempDate) As Datum,
week(TempDate) As Week,
Year(TempDate) As Jaar,
Month(TempDate) As Maand,
num(month(TempDate), '00' ) As Periode,
Day(TempDate) As Dag,
date(monthstart(TempDate), 'MMM-YYYY') As MaandJaar,
num#(date(monthstart(TempDate), 'YYYYMM') ) As JaarPeriode,
(Year(TempDate) * 12) + num(month(TempDate), '00' ) as JaarPeriodeID,
'Q' & Ceil (Month(TempDate)/3) As Kwartaal,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) As WeekJaar,
WeekDay(TempDate) As WeekDag,
if(TempDate = $(vMaxDate)
, 1
) As MaxDateFlag,
if(MakeDate(2000, month(today()), day(today())) >= MakeDate(2000, month(TempDate), Day(TempDate))
, 'YTD'
) As YTD
;
LOAD
$(vMinDate) + RecNo() As TempDate
autoGenerate $(vGenerate);
Does anyone have any ideas,
how i shuld go about this?
Thanks in advance.
Hello,
indeed, the client wants to see the following:
1) when selecting a month, he wants to see the number of the month year priot next to the current numbers to compare.
2) when selecting for example 2018 he wants to see the same data from the year before next to it.
We use this in our qlik sense enviroment:
Hello,
the variable is made and I scripted this:
But tis is giving an error behind "as weekDag" expected ")"
Don't know how this gives an error.
Any ideas?
Hello,
first of all, thank you for the responses.
Secondly:
QuarterMAP?
I don't know what you mean by that.
Let vToday = num(Today()-1);
SET vFiscalYearStartMonth = 4;
Is this both in the same variable?
I'm still getting syntax errors.
Sorry for the many questions.