Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gidon500
Creator II
Creator II

Get data between dates

Hi Guys

I need your help to solve the customer request .

enclosed is a file with data of :

DOCDATE  date of transaction

QUANT qty

WARHS  no   ,

TYPE of transaction   .

and more

I need to create SUM of QUANT  ( per WARHS  from today to  date1 - that will be given as variable   - for ex 01/09/2015

I need to create SUM  of QUANT  ( per WARHS  from today to  date2 - that will be given as variable  - for ex 15/09/2015

and sum of QUANT between date1 to date2  where TYPE = 'M'

thanks for your help

have a nice day .

gidon

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

Can you try the below expression as tresesco suggested for the between dates:

sum({<DOCDATE={'>=$(=date(vdate1)) <=$(=date(vdate2))'},TYPE={'M'}>} QUANT)

If that is not correct, can you share the output....



View solution in original post

8 Replies
trdandamudi
Master II
Master II

I was not clear on the out put that you need but you can take a look and the below and see if this is what you want.. If not can you please share your expected out put...

DataBetweenDates_2.jpg

Or may be this:

DataBetweenDates.jpg

gidon500
Creator II
Creator II
Author

Hi Thirumala 

thanks for your answer

I think there is one problem

SUM FOR DATE 1 is Ok

SUM FOR DATE 2 if Ok

BUT SUM BETWEEN DATES  IS WRONG  I THINK

thanks

for your help

gidon

Anil_Babu_Samineni

Gidon David wrote:

Hi Thirumala

thanks for your answer

I think there is one problem

SUM FOR DATE 1 is Ok

SUM FOR DATE 2 if Ok

BUT SUM BETWEEN DATES  IS WRONG  I THINK

thanks

for your help

gidon

Then try this for diff

Interval(Sum([DATE 1]) - Sum([DATE 2]))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

A small correction would be required in the expression. Try like:

sum({<DOCDATE={'>=$(=date(vdate1)) <=$(=date(vdate2))'},TYPE={'M'}>} QUANT)

Anonymous
Not applicable

try like this?

1) sum({<DateField={'>=$(=Date(Date1))<=$(date(today()))'}>} QUANT)

2) sum({<DateField={'>=$(=Date(Date2))<=$(date(today()))'}>} QUANT)


3) 1) sum({<Type={'M'},DateField={'>=$(=Date(Date1))<=$(date(Date2))'}>} QUANT)


make sure format of all date fields value should be same.

maniram23
Creator II
Creator II

HI,

Please Check it below attached file.

trdandamudi
Master II
Master II

Can you try the below expression as tresesco suggested for the between dates:

sum({<DOCDATE={'>=$(=date(vdate1)) <=$(=date(vdate2))'},TYPE={'M'}>} QUANT)

If that is not correct, can you share the output....



gidon500
Creator II
Creator II
Author

Hi guys

thanks for the help

it is correct answer , that is the way to do it

gidon