Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
christiana
Contributor III
Contributor III

Variable date range calculation in Set Analysis

Dear all,

I'm trying to set up a layout with date calculations within the Set Analysis.

Background: user should be able to choose a key date and the AR overdue date ranges he wants to look at.

Example: Key date is 31.05.2019, the AR overdue ranges are 30, 60 and 90.

My formula looks currently like this:

sum({<DueDate={">=($(vKeyDate)-$(vCateg2)) <=$(vKeyDate)-$(vCateg1) "}>} Amount)

in Words: the sum of the field amount should be calculated when the duedate is greater than 01.04.2019 and less than 01.05.2019.

What am I doing wrong?

Many thanks for your help!

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

Look at the attached

image.png

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

Move the calculation to a single variable

e.g. $(vKeyDate)-$(vCateg2) to vKeyDateLow

and change expression to

Sum({<DueDate={">=$(=vKeyDateLow) <=$(=vKeyDateMax)"}>} Amount)

christiana
Contributor III
Contributor III
Author

Unfortunately I'm not able to make it work.

I have attached a sample qvw file.

Any idea what is going wrong?

sunny_talwar

Look at the attached

image.png

christiana
Contributor III
Contributor III
Author

Many many thanks to you!

I transfered it to my Qlikview application and it is working!

Thanks a lot for your quick support and help!