Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ksleini
Contributor
Contributor

Simple data range question

Hi guys,

i'm stucking ni this simple situation where i need ta have bars from a date range (2014-now) but not all date have data in them, how do i generate a local autogenareted table with a date range applinked?

in Oracle i would do someting like this:

 

 

SELECT

(to_date(sysdate,'DD-MM-YYYY') - level + 1) AS day

FROM

dual

CONNECT BY LEVEL <= (to_date(sysdate,'DD-MM-YYYY') - to_date('01-01-2014','DD-MM-YYYY') + 1);

 

 

2 Replies
tresesco
MVP
MVP

Like this?

Load  Date(Today()-365+RecNo())) as Date

AutoGenerate 365;

vinieme12
Champion III
Champion III

When you create a master calendar for your model, this problem will be solved automatically

https://qlikviewcookbook.com/2015/05/better-calendar-scripts/

 

alternatively look at this as well 

https://community.qlik.com/t5/Qlik-Design-Blog/How-to-populate-a-sparsely-populated-field/ba-p/14706...

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.