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: 
kunkumnaveen
Specialist
Specialist

how to write a set analysis

Hello ,

           how to write this in set analysis  DOC_DATE>VALIDFROM  and  <VALIDTO

i tried this

                        DOC_DATE={">=$(VALIDFROM )<=$(VALIDTO)"}PPV.PNG

Only the DOC_DATE=01-07-2017 is a valid one,i need to show only that   AMOUNT

Any suggestion plz

3 Replies
sunny_talwar

Better to use if statement here or create a flag in the script

If(DOC_DATE > PK_VALIDFROM and DOC_DATE < PK_VALIDTO, 1, 0) as Flag

kunkumnaveen
Specialist
Specialist
Author

Hello ,thanks for your reply ,

At script level DOC_DATE is coming from different table

and the rest two Fields are coming from different table

i think i need to create to it in set analysis only?

if so

sum(DOC_DATE={">=$(VALIDFROM )<=$(VALIDTO)"}>}Amount)

sunny_talwar

Then I would say, just use this:

Sum(If(DOC_DATE > PK_VALIDFROM and DOC_DATE < PK_VALIDTO, AMOUNT))