Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date comparison

I have a input control which stores date in a variable say vDate. I have two fields Inception Date and Expiration Date. Based on the value in input control I need to get the results in Straight table or Pivot table with the condition Where Inception Date>= vDate and Expiration Date <= vDate.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

I got this working by using below.

sum({<InceptionDate={"<=$(vDate)"},ExpirationDate={">=$(vDate)"}>}Sales)

View solution in original post

3 Replies
Not applicable
Author

Hi

try this if(Inception Date>= vDate and Expiration Date <= vDate,DimName)

sushil353
Master II
Master II

hi,

If you want to use this condition for an expression then u can use set analysis:

sum({<Inception Date={">=$(vDate)"},Expiration Date={"<= $(vDate)"}>}FACT)

and if you want to use in dimention then you can follow expression as given by nirmal.

if(Inception Date>= vDate and Expiration Date <= vDate,DimName)

HTH

Sushil


Not applicable
Author

I got this working by using below.

sum({<InceptionDate={"<=$(vDate)"},ExpirationDate={">=$(vDate)"}>}Sales)