Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

Hi what will happen if I choose 1 as a set Modifier e.g. Position {1}? Will QlikView take the total postion or the first Position? Would be great if someone has experience with something like this.

Tags (1)
10 Replies
Employee
Employee

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

In order for QlikView to return results from the entire data set, the {1} must be used as an identifier and not a modifier.

So if you do something like

sum({1}Sales)

it will return sales amount for your entire dataset, ignoring all your selections.

But if you have something like

sum({$<ColorID={1}>}Sales)

it will give us the sales for all the products with ColorID=1.

So in your case, if you use something like Position={1} as a modifier, it will return the sales where Position value = 1 (provided that there is a Position field in your data model)

I hope this helps

Agis

Not applicable

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

sum({$}sales}  -  it returns sales for current selection only
sum({1}slaes} -   it returns sales for all irrespective selection(it igone selection all shows for all)

Not applicable

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

Thank you for the great explanation

Employee
Employee

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

Thanks for your kind response Abdul.

Could you please mark the answer as Helpful or Correct so as to close the discussion?

Thanks

Agis :-)

Not applicable

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

Hi Agis,

may be you have also an answer to the following question regarding to set analysis. Which of the following Analysis will work? Or do you have any idea which is will work better?

sum($({<Color= {Blue} or {Yellow}, etc....>}, Sales)

sum($({<Color= {Blue or Yellow}, etc....>}, Sales)

Employee
Employee

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

The correct syntax is

sum({$<Color= {'Blue', 'Yellow'}, etc....>}Sales)

Not applicable

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

Well in your example the result will be blue and yello but how about blue or yellow? is it possible to write it in one of the above listed way?

Employee
Employee

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

In my example the results will be Blue OR Yellow.

The comma separator works as an OR operator here, so this is exactly what you're looking for.

Not applicable

Re: What will happen in a Set Analysis if I take an ID Field and choose 1 as a Set modifier?

So what would an and look like? I thought all the values seperated with a ',' {value1, etc.} are attached with an and. May be I understood something wrond in the Ref. Manual.

Community Browser