Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
AlexWest
Creator
Creator

Please explain the expression block by block in Aggregate function

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)

Labels (3)
2 Solutions

Accepted Solutions
vinieme12
Champion III
Champion III

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

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

vinieme12
Champion III
Champion III

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

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

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

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
AlexWest
Creator
Creator
Author

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?

vinieme12
Champion III
Champion III

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

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
AlexWest
Creator
Creator
Author

Many thanks! Your answers are really helped me/us to understand something new.