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: 
gauravgg
Partner - Creator
Partner - Creator

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
amayuresh
Creator III
Creator III

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.

avinashelite

Try like this

//assuming your trying to count the Orders

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

Kushal_Chawda

Try this,


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