Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
linoyel
Specialist
Specialist

Qliksense derived fields calendar gaps

Hi, is there a way to fill in date gaps in autoCalendar?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Not as far as I know. You'd have to create your own calendar table for that. The Qlik Components Library makes that very easy though . See this app for example: Qlikview-Components/Sense Examples - Qlikview-Components · GitHub‌. The example doesn't use the shortcut function Qvc.CalendarFromField which makes it even easier. Instead of two lines

     CALL Qvc.GetFieldValues('vDate', 'Date', 'Sales');

     CALL Qvc.Calendar(vDate.Min, vDate.Max);

You use one line

     CALL Qvc.CalendarFromField('Date', 'Sales');


talk is cheap, supply exceeds demand

View solution in original post

14 Replies
Gysbert_Wassenaar

Not as far as I know. You'd have to create your own calendar table for that. The Qlik Components Library makes that very easy though . See this app for example: Qlikview-Components/Sense Examples - Qlikview-Components · GitHub‌. The example doesn't use the shortcut function Qvc.CalendarFromField which makes it even easier. Instead of two lines

     CALL Qvc.GetFieldValues('vDate', 'Date', 'Sales');

     CALL Qvc.Calendar(vDate.Min, vDate.Max);

You use one line

     CALL Qvc.CalendarFromField('Date', 'Sales');


talk is cheap, supply exceeds demand
linoyel
Specialist
Specialist
Author

Thanks Gysbert, I'll look at the app.

Another question regards derived fields calendar: is there a way to have a script in a schema model and then bring it to my app using binary load? I tried to do so but it didn't upload by binary load since it's not a part of the schema.

So it it right to have this calendar script at the final app?

Gysbert_Wassenaar

A binary load only loads the data, not the script. If you want to modify the data after binary loading then add the script to do that after the first line that does the binary load. A calendar script would for example go there. If you want to load script into an app you can put the script into a text file and include it in both apps using the $(Include=...script_file_name_here...) or $(Must_Include=...script_file_name_here...) statements.


talk is cheap, supply exceeds demand
linoyel
Specialist
Specialist
Author

Thank you!

linoyel
Specialist
Specialist
Author

In his example Rob uses Qvc.qvs script which i can't find anywhere to download.

Do you know maybe where I can get it?

I tried with qvc_Calendar.qvs but it's not working


I tried to call Capture.PNG

Gysbert_Wassenaar

You can find it on the Releases page: Releases · RobWunderlich/Qlikview-Components · GitHub


talk is cheap, supply exceeds demand
linoyel
Specialist
Specialist
Author

Great, that worked! Thank you!

The last question: is it possible to implement this approach regarding 2 different date fields?

Gysbert_Wassenaar

You can create separate calendars for every date field. Just specify the field and the name the calendar table should get. You can also create a common calendar. See this blog post: Canonical Date


talk is cheap, supply exceeds demand
linoyel
Specialist
Specialist
Author

Separate calendars for 2 fifferent date fields:

CALL Qvc.CalendarFromField('Order Date','OrderDateCalendar');

CALL Qvc.CalendarFromField('Ship Date','ShipDateCalendar');

This creates a lot of syn fields...

Capture.PNG