Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tomhovens
Contributor II
Contributor II

Missing date for Graph

Dear Qlikviewers,

I'm looking for a solution to the next problem:

StartDate (D/M/YYYY)EndDate (D/M/YYYY)Quantity
1-1-201510-1-20155
5-1-201510-1-20152
8-1-201511-1-20153

How to transform this table to a graph that has to following value

Date (D/M/YYYY)Quantity
1-1-20155
2-1-20155
3-1-20155
4-1-20155
5-1-20157
6-1-20157
7-1-20157
8-1-201510
9-1-201510
10-1-201510
11-1-20153
1 Solution

Accepted Solutions
Gysbert_Wassenaar

See this blog post: How to populate a sparsely populated field


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

See this blog post: How to populate a sparsely populated field


talk is cheap, supply exceeds demand
tomhovens
Contributor II
Contributor II
Author

is there a way to not reload the script?

Gysbert_Wassenaar

Probably, but that cure is probably worse than the disease.


talk is cheap, supply exceeds demand
jerem1234
Specialist II
Specialist II

Here's it without script using your example. Uses Valueloop and other oddities (for some reason date around valueloop doesn't work in the dimension, but works in expression, so had to hide the dimension column). You are better off going with script; much cleaner and flexible. I'd listen to Gysbert.

Hope this helps!

MarcoWedel

Hi,

I totally agree that you should change your script and reload your data.

Another solution doing so could be:

QlikCommunity_Message_149294_Pic1.JPG

QlikCommunity_Message_149294_Pic2.JPG

QlikCommunity_Message_149294_Pic3.JPG

table1:

LOAD *,

    AutoNumberHash128([StartDate (D/M/YYYY)], [EndDate (D/M/YYYY)]) as %ID

FROM [http://community.qlik.com/thread/149294] (html, codepage is 1252, embedded labels, table is @1);

tabCalendar:

LOAD Date(MinDate+IterNo()-1) as Date

While MinDate+IterNo()-1<=MaxDate;

LOAD Min([StartDate (D/M/YYYY)]) as MinDate,

    Max([EndDate (D/M/YYYY)]) as MaxDate

Resident table1;

tabLink:

IntervalMatch(Date)

LOAD [StartDate (D/M/YYYY)], [EndDate (D/M/YYYY)]

Resident table1;

Left Join (tabLink)

LOAD Distinct

  [StartDate (D/M/YYYY)],

  [EndDate (D/M/YYYY)],

  AutoNumberHash128([StartDate (D/M/YYYY)], [EndDate (D/M/YYYY)]) as %ID

Resident tabLink;

DROP Fields [StartDate (D/M/YYYY)], [EndDate (D/M/YYYY)] From tabLink;

hope this helps

regards

Marco