Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: creating an inline table with the last 60 dates

Hi,

Use AutoGenerate with Load.  Try something like this

TempDates:

Load

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

autogenerate(61);

Regards,

Jagan.

2 Replies
MVP
MVP

Re: creating an inline table with the last 60 dates

Hi,

Use AutoGenerate with Load.  Try something like this

TempDates:

Load

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

autogenerate(61);

Regards,

Jagan.

Not applicable

Re: creating an inline table with the last 60 dates

Thank you Jagan, that works great!

Hanno

Community Browser