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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Newbie trying to further understand expressions

Hello guys,

My usual expressions so far would be involving IFs until I stumbled upon expressions something like this:

Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} Sales)


I may be wrong but does the above expression similar to this expression?

SUM(IF(Year=?? AND Month=?? AND Quarter=?? AND Week=?? AND DateField=?? AND DateNum >= NUM(YEARSTART(MAX(DateNum))) AND DateNum <= MAX(DateNum), Sales))

Can somebody point me the direction to further understand this kind of expression?

Thank you very much for your kind attention guys.

5 Replies
tresesco
MVP
MVP

Learn about Set Analysis.

Not applicable
Author

Hi,

the first expression you posted just sets some field-values for you calculation. meaning it ignores the selection of year, month quarter, week, datefield and it sets the selection for the datenum.

in you second expression you would just say if this selections are made then calculate my expression. you can have two different results because in you second expression the value of date num can be between da yearstart(max(datenuem) and max(datenum) and in you first expression the selection is made.

i hope it explained it a lil bit but basicly in the first expression you set or ignore selections and in the second you just check if some kind of selection is made.

regrads,

MT

its_anandrjs
Champion III
Champion III

Learn the SET Analysis

Not applicable
Author

tresesco,

Thank you very much for the documentations. Now I know that it is called Set Analysis. Currently reading it for further understanding on this matter.

Thank you for your kind attention

Not applicable
Author

Magdalena Tammegger,

Thank you very much for the explanations. Helps me to further understand Set Analysis

Thank you for your kind attention