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

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
MK9885
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
prieper
Master II
Master II

ONLY then should help....

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

but then FieldC should be in the dimensions

HTH

Peter

qlikwiz123
Creator III
Creator III
Author

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?

prieper
Master II
Master II

Can you provide an example?

MK9885
Master II
Master II

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

This would help show values without user selecting any values.

balabhaskarqlik

May be this:

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

qlikwiz123
Creator III
Creator III
Author

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.

qlikwiz123
Creator III
Creator III
Author

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.

MK9885
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.

qlikwiz123
Creator III
Creator III
Author

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)