Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Goodmorning everyone. Hi work in Qlik Sense 3.2.4
I should create a calendar that selects several years and months and a range of days works in the following ways:
I'm using the extension:
Years selected: 2015 - 2016 - 2017
Months selected: January - February - March - April
Days selected: 01 -02 -03 -04 -05 -06 -07 -08 -09 -10
The data selected must be those of: all years
and for the months: all months until the end of March and April until the 10th.
( Years >= 2015, Months >= January and <= March , Days >= 10)
Thanks to everyone for the collaboration
Bye
Manuel
Here is your solution:
LET varMinDate = Num(MakeDate(2015)); //first date
LET varMaxDate = Floor(num(Today()));
TempCalendar1:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
TempCalendar2:
Load
TempDate AS Date1
,Year(TempDate) As Year1
,Month(TempDate) As Month1
Resident TempCalendar1
where Day(TempDate) <= 10 and Match(Month(TempDate), 'янв', 'фев', 'мар', 'апр') > 0;
Drop Table TempCalendar1;
1. Genereate temp autocalendar use your mindate and maxdate.
2. Load calendar table using your filters.
Here is your solution:
LET varMinDate = Num(MakeDate(2015)); //first date
LET varMaxDate = Floor(num(Today()));
TempCalendar1:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
TempCalendar2:
Load
TempDate AS Date1
,Year(TempDate) As Year1
,Month(TempDate) As Month1
Resident TempCalendar1
where Day(TempDate) <= 10 and Match(Month(TempDate), 'янв', 'фев', 'мар', 'апр') > 0;
Drop Table TempCalendar1;
Thanks for your answer.
How can I use the Year, Month, and Day selection that are selected in the selection bar ??
Bye
Detail better my need
The data extracted must be:
Year = 2017
Month = all day of Months selected in Bar (01/02/03/04) and for month 05 days <= 10
If more years are selected in the bar, the period must also be the same.
For Example:
The data extracted must be:
Year = 2016
Month = all day of Months selected in Bar (01/02/03/04) and for month 05 days <= 10
thank you
Manuel
Your question was how to make custom calendar isn't it?
And now you asking for selection help which not meant to the fisrt question.
I suggest you to close this or/and open new topic for selections.
So in selection topic i ask on your second question.
For that, your solution is perfect, but I have to add what I have detailed in the answer, is it possible ???
thank you
OK
Anyway...
What do you mean here 'If more years are selected in the bar, the period must also be the same' ?
Be the same for what? For some table, chart, KPI?