Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating an inline table with the last 60 dates

I am terribly new to Qlikview, forgive me if this is old hat (though I searched a lot without finding a definite solution).

Let's say I have a bar chart to show my last 60 days of sales performance.  Occasionally we have a day with zero sales.  But I want that to show, too.  If I set the dimension to be the "date of sale" then those zero bars will not show.  I want to force the chart to show stats, even if zero, for 60 periods.

One way I thought might work, would be to Load Inline a table consisting of the last 60 dates, and then use it as the dimension for the bar chart.  That way it would keep the dates fresh, no hardcoding, and there would never be a missing date when we have no sales.  But the inline load system doesn't like any of the formulas I tried for obtaining a date, it just loads them, not their calculated values.  I also tried a DO...WHILE loop to inline-load the 60 dates, and again couldn't get real dates into the table, just formulas. 

Thank you in advance for any advice that you might have!

Hanno

Maryland & Deutschland

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Use AutoGenerate with Load.  Try something like this

TempDates:

Load

    Date(Today() - RecNo( )) as Dates

autogenerate(61);

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Use AutoGenerate with Load.  Try something like this

TempDates:

Load

    Date(Today() - RecNo( )) as Dates

autogenerate(61);

Regards,

Jagan.

Not applicable
Author

Thank you Jagan, that works great!

Hanno