Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

vmsistemi
New Contributor III

Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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

1 Solution

Accepted Solutions
vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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;

15 Replies
vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

1. Genereate temp autocalendar use your mindate and maxdate.

2. Load calendar table using your filters.

vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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;

vmsistemi
New Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

Thanks for your answer.


How can I use the Year, Month, and Day selection that are selected in the selection bar ??


Bye

vmsistemi
New Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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
RangeDatewithDay.jpg

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

vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

Your question was how to make custom calendar isn't it?

vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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.

vmsistemi
New Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

For that, your solution is perfect, but I have to add what I have detailed in the answer, is it possible ???

thank you

vmsistemi
New Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

OK

vasiliy_beshent
Contributor III

Re: Custom Calendar in Qlik Sense 3.2.4 with independent days from range of month.

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?

Community Browser