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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only & Set Analysis & Total syntax

Hi all, help understanding the following syntax. I understand usually syntax for set analysis is

sum({$<FIELD={'VALUE'}>}Amount)


I don't understand following concept. Why angle brackets come after set analysis syntax instead of original set analysis concept?


=ONLY({1}TOTAL <Month>Amount)

Thanks!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

The only set analysis here is {1}, which is saying to take the entire data set ignoring all selections. The rest is unrelated to set analysis, just additional modifiers to your only() aggregation. TOTAL says to ignore all chart dimensions and perform the only() aggregation disregarding the chart dimensions. So {1} TOTAL is saying "give me everything, and I mean everything, ignore selections, ignore chart dimensions". But <Month> modifies that further, adding, "well, except for the Month dimension, I DO care about that, do this for only the Month for this row in the chart".

So for a given row in your chart, if there is only a single Amount in your entire data set for the month associated with that row, then you will see that Amount, else you will get null.

View solution in original post

2 Replies
johnw
Champion III
Champion III

The only set analysis here is {1}, which is saying to take the entire data set ignoring all selections. The rest is unrelated to set analysis, just additional modifiers to your only() aggregation. TOTAL says to ignore all chart dimensions and perform the only() aggregation disregarding the chart dimensions. So {1} TOTAL is saying "give me everything, and I mean everything, ignore selections, ignore chart dimensions". But <Month> modifies that further, adding, "well, except for the Month dimension, I DO care about that, do this for only the Month for this row in the chart".

So for a given row in your chart, if there is only a single Amount in your entire data set for the month associated with that row, then you will see that Amount, else you will get null.

Not applicable
Author

Thanks for clearing this up; it's all too clear now