Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Set Analysis - Expression

How can we write a set analysis in expression for displaying only those values of a field 'Field1' which are equal to 10?

1 Solution

Accepted Solutions
Highlighted
Master III
Master III

Re: Set Analysis - Expression

=if(Index(Concat(Reference,'|'),Year)=0 ,NumberOfSchools)

View solution in original post

9 Replies
Highlighted
Specialist III
Specialist III

Re: Set Analysis - Expression

You will use Set Analysis where you need a aggregation. Not in this case. You can use a if condition here.

Thanks,

Rajesh Vaswani

Highlighted
Master III
Master III

Re: Set Analysis - Expression

Sum({<Field1={10}>}Field2)

Highlighted
Not applicable

Re: Set Analysis - Expression

Please see the attached file. In the combo chart, I want that for the Year '2002', bar should not be displayed. Condition for the expression that I've written is: if(Year=2002,'0','1')

Please check what's wrong here.

Thanks!

Highlighted
Master III
Master III

Re: Set Analysis - Expression

if(Year<>'2002',NumberOfParks)

if(Year<>'2002',NumberOfSchools)

Highlighted
Specialist III
Specialist III

Re: Set Analysis - Expression

Hi Nishant,

Check attachment, have added the condition in the dimension. The else part i.e. 2002 will become null. Have suppressed nulls for dimension then.

thanks,

Rajesh Vaswani

Highlighted
Not applicable

Re: Set Analysis - Expression

Hi Anbu

Thanks for your reply. I made it using your approach. I made a slight change because for Year 2002, I just don't need bar. But line should always be displayed (even for Year 2002).

But I have a small doubt again. Please check the file attached. Instead of hard coding a value like in if(Year<>'2002',NumberOfParks), I would like to get '2002' from a field. This time the field can have more than 1 values. For example in the attached example, I have two values '2001' and '2002' in the Reference field. How to take these values into account?

Thanks!

Highlighted
Not applicable

Re: Set Analysis - Expression

Hi Rajesh

Thanks for your reply but I didn't want my dimension to disappear from display. That's whyI don't use condition in Dimension. However I have the problem of using filter value from another field. Please see the attached example. I have two values '2001' and '2002' in the Reference field. How to take these values into account for filtering bar in the combo chart?

Highlighted
Master III
Master III

Re: Set Analysis - Expression

=if(Index(Concat(Reference,'|'),Year)=0 ,NumberOfSchools)

View solution in original post

Highlighted
Specialist III
Specialist III

Re: Set Analysis - Expression

Hi Nishant,

Anbu has given the correct answer.

thanks,

Rajesh Vaswani