Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Promotional Periods on a click

Hi there,

I have a table with promotional period details as below.

Promotion               Date From          Date To

August                   01/08/2015         31/08/2015

Wkend Madness     01/10/2015         3/10/2015

I want to effectively set variables for the date from and date to fields so that when a user clicks on 'Wkend Madness' in a listbox, the variables are populated with the matching columns so that at a click of a button they can look at data relating to those promotional periods.

Any advice?

Dave.

2 Replies
Not applicable
Author

No one?

maxgro
MVP
MVP

I would try in a different way, so you can click on Promotion and filter the date without variables and button click

Promo:

load * inline [

Promotion       ,    FromDate      ,    ToDate

August          ,    01/08/2015       ,  31/08/2015

Wkend Madness   ,  01/10/2015  ,       3/10/2015

];

Promo_x_Dates:

Load

Promotion,

Date( FromDate + IterNo() -1) as ReferenceDate

Resident Promo

While IterNo() <= ToDate - FromDate + 1 ;

Fact:

load

  date(makedate(2015) + floor(rand()*365)) as ReferenceDate,

  rand()*100 as Sales

AutoGenerate 1000;