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: 
shyamcharan
Creator III
Creator III

Sets Analysis Query

Hi,

Can anyone please explain what point I miss in understanding the difference between '1' and '$' Identifier.

Please find the attached QVW document with a selection on the company.

I am expecting the Sum({$<Company = {'A','B'}, Year = {2011}>} Sales) value to be 2 rather than 8.

Thanks heaps in advance.

Regards,

Shyam.

16 Replies
Not applicable

year:

2000

2001

if u write $ and u click of 2000 then it is going to show  sum(sales) for 2000.

if u write 1 and u click on any year 2000,20001 doesn't mater   it returns total sum(sales) (i.e is 2000+ 20001  sales)

shyamcharan
Creator III
Creator III
Author

Thanks Manoj.

But thats not what happening in the attached QVW.

Can you please check that and let me know your observations.

Thanks again for the response.

Not applicable

Sum({$<Company = {'B'}, Year = {2011}>} Sales)      --   you will get output 2 here

if u write including (A,B)  then u r getting sum(sales) for 2011  . if u select  A OR B u get sum(sales) for 2011

=Sum({1<Company = {'A','B'}, Year = {2011}>} Sales)     =   8  u will get here

danieloberbilli
Specialist II
Specialist II

There is no difference in this particular example as you consider all available fields within your set analysis.

Bu try out to create another field like Category (first two rows Cat1, last two rows Cat2) - and don't mention this new field in your set analysis...then you will see the difference: as Category is not considered - any Category selection is ignored in the set analysis with {1} but considered in the one below with {$}

aveeeeeee7en
Specialist III
Specialist III

Hi

This is Conceptual.

See this:

Year is 2011:  Sales:  A=6 + B=2  =  8

The difference between '1' & '$' is
'1' - It will Freeze the value which means the Value '8' will not change on any Selection.
'$' -The value will change as per the Selection.

Also, check the Attachment.

Regards

Av7eN

Not applicable

why are you expecting 2 here? because in your data set in 2011, A=6 and B=2 then in set analysis {'A','B'}= 8

shyamcharan
Creator III
Creator III
Author

Thanks Daniel.

That clarifies my doubt but, why the Company = {'A','B'} set has no effect on the result even when it is in the set analysis.

When I select a Category and make a selection on it like '1' then I was expecting  a result as '8' because I have 'A' and 'B' in the set. How is this excluded when I select the Category?

Regards,

Shyam.

Not applicable

if(match(Category,'A'.'B'),sum(sales))

danieloberbilli
Specialist II
Specialist II

if you explicitly write Company=A,B in your set analysis - QlikView will always consider this selection. The {1} effects all (other) field selections that are not explicitly defined within your set analysis expression