Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
Contributor 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
Highlighted
Contributor II

Re: Writting a Date range in an expression

help Please stalwar1

Highlighted

Re: Writting a Date range in an expression

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

Highlighted
Contributor II

Re: Writting a Date range in an expression

Please help me in attaching the application ?

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

Highlighted

Re: Writting a Date range in an expression

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

Highlighted
Contributor II

Re: Writting a Date range in an expression

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 ?

Highlighted
New Contributor III

Re: Writting a Date range in an expression

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

];

Highlighted
Honored Contributor III

Re: Writting a Date range in an expression

may be like this

LOAD

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

INLINE [

InlineDate,event

10/10/2018,Diwali

];