Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, guys!
Sorry for my question, but I honestly tried to find the info in the manual, but coudn't find a thing((
So I've got the next expression on this forum from the guru of the Qlik:
COUNT ({< [date]={">=$(=MonthStart(max([date])))<=$(=max([date]))"}>} [client_id])
And I understood how it works in the end, but I couldn't get the process.
I don't understand all these signs after COUNT word XD.
So, can anyone decipher this expression sign by sign or block by block for me and for other newbies?
What means each sign or operator?
Thanks a lot in advance, and please excuse me for the question)
Refer this article on Set Analysis
https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/
Expression Search
https://community.qlik.com/t5/Design/The-Expression-Search/ba-p/1463907
Dates in Set Analysis
https://community.qlik.com/t5/Design/Dates-in-Set-Analysis/ba-p/1472511
_____________________________________________________________________________
< [date]={">=$(=MonthStart(max([date])))<=$(=max([date]))"}>}
{ - - - } Set analysis is always with Curly brackets
{ < - - - > } Set Modifiers are defined within angle brackets this is where you define conditions for set (refer Set Analysis article link)
{ < - - - > +-*/ < - - - > +-*/ < - - - > } You can have a Union/Difference/Intersection/XOR of multiple Sets using Operators +-*/
[date] >=$(=MonthStart(max([date])))<=$(=max([date]))
This is basically doing an expression Search of the [date] field
max([date]) << returns the MAXIMUM value from the field
Monthstart(max([date])) << Functions evaluates from inner most to outer; so this evaluates as below
step1) Monthstart( 11/01/2023)
step2) 01/01/2023
finally we have an expression search string as below
[date] = '>=01/01/2023<=11/01/2023'
finally the most important is $(=) Dollar expansion which is explained here in detail
https://community.qlik.com/t5/Design/The-Magic-of-Dollar-Expansions/ba-p/1471979
Expression searches must be enclosed in double quotes " "
String Searches must be enclosed in single quotes
Name={'John'} is a string search
Name={"Jo*"} is an expression search
Comparing numbers/dates <>= are all expression searches
Refer below
https://community.qlik.com/t5/Design/Quotes-in-Set-Analysis/ba-p/1471824
Refer this article on Set Analysis
https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/
Expression Search
https://community.qlik.com/t5/Design/The-Expression-Search/ba-p/1463907
Dates in Set Analysis
https://community.qlik.com/t5/Design/Dates-in-Set-Analysis/ba-p/1472511
_____________________________________________________________________________
< [date]={">=$(=MonthStart(max([date])))<=$(=max([date]))"}>}
{ - - - } Set analysis is always with Curly brackets
{ < - - - > } Set Modifiers are defined within angle brackets this is where you define conditions for set (refer Set Analysis article link)
{ < - - - > +-*/ < - - - > +-*/ < - - - > } You can have a Union/Difference/Intersection/XOR of multiple Sets using Operators +-*/
[date] >=$(=MonthStart(max([date])))<=$(=max([date]))
This is basically doing an expression Search of the [date] field
max([date]) << returns the MAXIMUM value from the field
Monthstart(max([date])) << Functions evaluates from inner most to outer; so this evaluates as below
step1) Monthstart( 11/01/2023)
step2) 01/01/2023
finally we have an expression search string as below
[date] = '>=01/01/2023<=11/01/2023'
finally the most important is $(=) Dollar expansion which is explained here in detail
https://community.qlik.com/t5/Design/The-Magic-of-Dollar-Expansions/ba-p/1471979
Thank you, Vineeth, for this full info!
But there is still only one last question: why all arguments are in double quotes, like a text?
Expression searches must be enclosed in double quotes " "
String Searches must be enclosed in single quotes
Name={'John'} is a string search
Name={"Jo*"} is an expression search
Comparing numbers/dates <>= are all expression searches
Refer below
https://community.qlik.com/t5/Design/Quotes-in-Set-Analysis/ba-p/1471824
Many thanks! Your answers are really helped me/us to understand something new.