Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
why in a set expression the date today function is in a double quote:
count({<[EndterminEck.autoCalendar.Date]={"$(=Date(Today()+2))"}>} Orders)
and in a if statement it should be like this:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))',Orders))
aren't both a kind of DSE?
Thanks in advance.
Best.
In set double quotes are evaluated and single are not. In your case it should have been sufficient with single in both if and set statement.
You would normally use double if you where to compare, let's say dates lather than your expression would look like this :
count({<[EndterminEck.autoCalendar.Date]={">=$(=Date(Today()+2))"}>} Orders)
If you where looking for a date value that contained the >=symbols you would use single.
In Set Analysis, the single quote represents a String and the double quote used for Search Argument.
In the IF statement also, the single quote been used for String representation.
BTW, in your COUNT-IF I still think the DSE is not needed.
@Applicable88 , I am impressed with the way you are approaching the qlik learning. Your questions and counter -questions (that I have been noticing in recent couple of days in community)are really good. I would recommend you to read blogs written by @hic . That would make your base of Qlik understanding strong.
For this specific question, read: https://community.qlik.com/t5/Qlik-Design-Blog/Quotes-in-Set-Analysis/ba-p/1471824
In set analysis, looking for a specific date, both will work:
{<Date={"$(=Date(Today()+2))"}>}
{<Date={'$(=Date(Today()+2))'}>}
The first will treat the content as a search string, and the second will treat it as an exact match. But the result will be the same.
However, if you want to make a real search where the result may be several dates, you must use double quotes:
{<Date={">$(=Date(Today()+2))"}>}
Single quotes would make it look for a string beginning with '>'.
Finally, in an if-function single quotes will denote a field value (which is what you want), whereas double quotes will denote a field name.
HIC
In set double quotes are evaluated and single are not. In your case it should have been sufficient with single in both if and set statement.
You would normally use double if you where to compare, let's say dates lather than your expression would look like this :
count({<[EndterminEck.autoCalendar.Date]={">=$(=Date(Today()+2))"}>} Orders)
If you where looking for a date value that contained the >=symbols you would use single.
In Set Analysis, the single quote represents a String and the double quote used for Search Argument.
In the IF statement also, the single quote been used for String representation.
BTW, in your COUNT-IF I still think the DSE is not needed.
Hello @Vegar ,
Can you explain to me a little more:
"In set double quotes are evaluated and single are not. In your case it should have been sufficient with single in both if and set statement."
So isn't my double quotes needs to "evaluate" my function? So why it also works well with single quotes?
In your example you used that '>=:
count({<[EndterminEck.autoCalendar.Date]={">=$(=Date(Today()+2))"}>} Orders)
"If you where looking for a date value that contained the >=symbols you would use single."
But still you use double quotes?
Thanks in advance.
@Applicable88 , I am impressed with the way you are approaching the qlik learning. Your questions and counter -questions (that I have been noticing in recent couple of days in community)are really good. I would recommend you to read blogs written by @hic . That would make your base of Qlik understanding strong.
For this specific question, read: https://community.qlik.com/t5/Qlik-Design-Blog/Quotes-in-Set-Analysis/ba-p/1471824
In set analysis, looking for a specific date, both will work:
{<Date={"$(=Date(Today()+2))"}>}
{<Date={'$(=Date(Today()+2))'}>}
The first will treat the content as a search string, and the second will treat it as an exact match. But the result will be the same.
However, if you want to make a real search where the result may be several dates, you must use double quotes:
{<Date={">$(=Date(Today()+2))"}>}
Single quotes would make it look for a string beginning with '>'.
Finally, in an if-function single quotes will denote a field value (which is what you want), whereas double quotes will denote a field name.
HIC