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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

Show me only the Value in two days as a if -statement

Hello,

As a set analysist I can use something like :

count(distinct {<[orderdate.autoCalendar.Date]={"$(=Date(Today()+2))"}>}Orders)

But as a If-Statement I got zero or Null returns. Maybe I have a syntax error:

if({<[orderdate.autoCalendar.Date]={"$(=Date(Today()+2))"}>},Orders)

I think the setexpression with DSE has to be written differently in a If-Statement?

Thanks in advance.

Best.

2 Replies
tresesco
MVP
MVP

Set expression could only be used in an aggregation function. If you are using an If-statement alone, you can't use set expression, try a simple expression instead, like:

if([orderdate.autoCalendar.Date]='$(=Date(Today()+2))', Orders)

Applicable88
Creator III
Creator III
Author

Hello,

thank you so far.

In the autocalendar there is definitely a value in two days. 

the syntax seems okay, but when I put it into the table it says invalid value. 

what is the problem?