Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
what is the $ in set analysis? ca you any one answered me
Dollar is the opposite of 1 so you can write
Eg:
Sum({$ <myFld={1}>} Value)
or
Sum({1 <myFld={1}>} Value)
S means that sum result depends on the selections you have, 1 means that selections are not considered
$ means 'User Selections' and is what QlikView is doing by default, that is why it is not necessarily needed in set analysis and is often left out.
It is an IDENTIFIER and there are other identifiers that can also be used. '1' is another and means 'All data disregarding user selections' but there are others that you might want to use.
Have a look in the help under set analysis about the different kind of IDENTIFIERS you can use.
copy and paste from QlikView help
Represents the records of the current selection.
The set expression {$} is thus the equivalent of not stating a set expression.
Note!
{1-$} is all the more interesting as it defines the inverse of the current selection, that is, everything that the current selection excludes.
Example:
sum( {$} Sales )
returns sales for the current selection, i.e. the same as sum(Sales)
you can found a different $ (different meaning) in set analysis
Variables and other dollar-sign expansions can be used in set expressions.
Examples:
sum( {$<Year = {$(#vLastYear)}>} Sales )
returns the sales for the previous year in relation to current selection. Here, a variable vLastYear containing the relevant year is used in a dollar-sign expansion.
sum( {$<Year = {$(#=Only(Year)-1)}>} Sales )
returns the sales for the previous year in relation to current selection. Here, a dollar-sign expansion is used to calculate previous year.
$ is the symbol for the Default State (or Default selection)
1 is the symbol for the complete data set
If you would introduce Alternate States, you can put those state names in the location of the $ to use those in your Set Analysis expressions.
Means that the expression will respond the the current user selections