Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

Writting a Date range in an expression

Hi,

I have to write an expression in which I need to know the sales based on given date range

Here I need to know the sales lets say one week prior to Diwali date

Diwali date is basically an internal table maintained in Qlikview (field names as lastDate  as shown in image.

PAINT2.png

so if I have to write an expression

here Diwali date ie( lastDate name has been changed by changing label name  as previous year ) will be treated as start date and for end date the no of days which will be entered by user

say  9 the corresponding date ie 10/10/2017 + 9 =10/1/2017 will be treated as end date.

and here 10/1/2017 is taken in a variable (DaysOfComp) as shown below

PAINT2.png

Please help how to write an expression for the above scenario?

7 Replies
sakshikaul
Creator II
Creator II
Author

help Please stalwar1

sunny_talwar

Would you be able to share the app you are working with?

sakshikaul
Creator II
Creator II
Author

Please help me in attaching the application ?

i am not able to see advanced editor option from where i can attach a document

sunny_talwar

Are you replying from the inbox? You need to come to come to this link Writting a Date range in an expression and then respond

sakshikaul
Creator II
Creator II
Author

InlinetableLastYear:
LOAD
Date(Date#(InlineDate, 'DD/MM/YYYY'), 'DD MMM YYYY') as lastDate
INLINE [
InlineDate,event
10/10/2018,Diwali
]
;

In this inline table why I am not able to see this event column ?

tharanikannan
Contributor III
Contributor III

Hi Sakshi,

please add event to your load script also.

InlinetableLastYear:

LOAD

Date(Date#(InlineDate, 'DD/MM/YYYY'), 'DD MMM YYYY') as lastDate,

event

INLINE [

InlineDate,event

10/10/2018,Diwali

];

prma7799
Master III
Master III

may be like this

LOAD

Date(Date#(InlineDate, 'DD/MM/YYYY'), 'DD MMM YYYY') as lastDate , event

INLINE [

InlineDate,event

10/10/2018,Diwali

];