Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Set Analysis to show field values based on condition

I want to show Field Values based on Conditions/Filters. I can use 'if', but the filters have to be manually selected in order for the values to be filtered. I need something like Set Analysis that doesn't change with other filters but show the values defined within the Expression.

if(FieldA='A', FieldB='B', FieldC)

In this case, the user needs to select 'A' in FieldA and 'B' in FieldB. I need the table to show only those values in FieldC that satisfies FieldA=A and FieldB=B all the time; something like Set Analysis but without Numeric Operators like Sum or Count?

1 Solution

Accepted Solutions
Highlighted
Master II
Master II

Maybe

Only({1<FieldA={'A'},FieldB={'B'}>} FieldC)

If you have a data set someone can help easily...

1 <<< in Set Analysis would ignore any selections made in filter hence Field A or Field B would be static.

View solution in original post

11 Replies
Highlighted
Master II
Master II

ONLY then should help....

ONLY({$<FieldA = {"A"}, FieldB = {"B"}>} FieldC)

but then FieldC should be in the dimensions

HTH

Peter

Highlighted
Creator II
Creator II

Hi Peter,

I have tried this before. The issue with Only is, if I select another value in FieldA or Field B other than A and B respectively, the table becomes empty. I need to show the values satisfying ({$<FieldA = {"A"}, FieldB = {"B"}>} FieldC)

irrespective of other values in the given fields. Anyway to achieve it?

Highlighted
Master II
Master II

Can you provide an example?

Master II
Master II

Try if(getselectedcount(FieldA)>0 your expression?

This would help show values without user selecting any values.

Highlighted

May be this:

If(GetFieldSelections(FieldA)= 'A' and GetFieldSelections(FieldB)='B',FieldC)

Highlighted
Creator II
Creator II

GetSelectedCount(FieldA) requires at least one value to be selected in FieldA. I need to show values of FieldC etc in a table if FieldA and FieldB satisfy the given conditions, irrespective of selections made on FieldA and FieldB; like Set Analysis which shows the data specified in the Set Analysis irrespective of selections made.

Highlighted
Creator II
Creator II

This requires the user to manually select values in FieldA and FieldB, which is similar to what 'if' statement does. Like I stated, my requirement is a bit different.

Highlighted
Master II
Master II

Can you please explain with a simple data set?

what do you expect to see if Field A or Field B or Field C is selected or not selected.

Thanks.

Highlighted
Creator II
Creator II

I want to show only those FieldC values in a Straight table that are associated with Value 'A' in FieldA and 'B' in FieldB. This has to be done without the user manually selecting A and B values in FieldA and FieldB respectively. Also, if the user selects any other value except for A and B in FieldA, FieldB, the straight table shouldn't change (The values in the table shouldn't reflect the filters on Field A and FieldB, just like Set Analysis which shows values irrespective of any other selection)