Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bwisealiahmad
Partner - Specialist
Partner - Specialist

What dos {$1} in the modifier do in Set Analysis

This might be a really simple question, but I am hoping someone can point me in the way of some good documentation on this.

I've seen examples where {$1} is used in the moderator. What exactly does this mean?

Example could be

Sum({<Account = {$1}, Company = {$2}>}Sales)

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

I think this is used in a variable if I am not wrong? See this:

Variables with Parameters

View solution in original post

27 Replies
girirajsinh
Creator III
Creator III

$1 – previous selection ($2: the second previous selection, etc.)

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

So is it used to make the set analysis calculation more dynamic based on choices? What if I you haven't made a selection yet?

stabben23
Partner - Master
Partner - Master

Maybe one off the most usless modifier ever?! or does someone have a great example to convince me.

eduardo_dimperio
Specialist II
Specialist II

Hey Ali, this material help me a lot with set analysis

I hope this could help you too.

girirajsinh
Creator III
Creator III

It is not being used in set analysis as you showed.

But like Sum({$1}Sales) , Sum({$1}Sales)

In situation where you want to see what difference it makes in tables or bars based on your selections.

You may creates set of bar charts showing different states. So its kind of dynamic comparisions

sunny_talwar

I think this is used in a variable if I am not wrong? See this:

Variables with Parameters

mayankraoka
Specialist
Specialist

Hi Ali,

PFA document for basic set analysis.

Regards,

Mayank

girirajsinh
Creator III
Creator III

Yes Sunny but  I think in variable parameter is used with $1 , here Ali asked about {$1}

But good that your brought this up. It helps clearing both concept.

For Ali,

Lets say you define variable vTemp with expression Sum(Sales)/$1

then using $(vTemp(1000))  would mean Sum(Sales)/1000.

Sunny, pls correct me if I am mistaking here something in understanding them

sunny_talwar

Where are you seeing {$1}?

Sum({<Account = {$1}, Company = {$2}>}Sales) -> Looks more like variable with parameters


Sum({$1<Account = {'123'}, Company = {'xyz'}>}Sales) -> Now looks like it is referring to previous selection.....

Sample to follow