Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
Partner
Partner

Select 30 days date for the date of selected date?

hi

I have a table campaign in which in have campaign dates

in another table Order I have Order dates

campaign and order table are linked in datamodel

when I select campaign date it should select 30 days date from that selected campaign date in order table

for eg

if i select  01/01/2016 in campaign table

so in order table it should select the date from 01/01/2016 to 30/01/2016

thanks in advance

4 Replies
Chanty4u
Esteemed Contributor III

Re: Select 30 days date for the date of selected date?

amayuresh
Contributor III

Re: Select 30 days date for the date of selected date?

Please check this.

Script:

Complain:

LOAD [Complain Date],

     [Order Number],

     Amount

FROM

(ooxml, embedded labels, table is Sheet1);

Order:

LOAD [Order Date],

     [Order Number],

     Qty

FROM

(ooxml, embedded labels, table is Sheet5);

Output:

1.PNG

I think, this is answer your question. If I select Complain Date as "01-02-2012", then table will show data for Complain Date from 01-02-2012 till last 30 Days.

Re: Select 30 days date for the date of selected date?

Try like this

//assuming your trying to count the Orders

count({<[Order dates]={">=max([campaign date])-30<=max([campaign date])>}Order)

Re: Select 30 days date for the date of selected date?

Try this,


=Sum({<[Order dates]={">=$(=date(max([campaign date])-30))<=$(=date(max([campaign date])))>}OrderValue)