Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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?