Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasshana
Creator II
Creator II

Require help with the IF statement

Hi,

I've below data.

ID New Value
1 abc 123
1 abc 456
1 abc 789
2 efg 963

 

I'm using the below IF statement to show the three values if I select 'abc' but it is showing only value '123'

if(match(ID,'1') and match(New'abc'),'123',if(match(ID,'1') and match(New,'abc'),'456' ,
if(match(ID,'1') and match(New'abc'),'789')))

I'm looking for an IF Statement to show all the three values (123, 456, 789) if I select 'abc'.

Regards,

Vikas

2 Replies
justISO
Specialist
Specialist

Hi, you need third dimension to separate 3 rows where ID = 1 and New = abc, because now these 3 rows are identical and if you are using 'if' to create 3 different Values, logic works so, that Value is applied for first true condition of 'if' and it is '123'.

vinieme12
Champion III
Champion III

If() will return the first value for which the condition is true

and your conditions are the same for all three ifs() !

so it's simply returning the first value the condition returned true

 

Where exactly do you want to show these three values?  not sure what you are trying to achieve here

you can try below

Table Chart

Dimension = ID

Measure = if(GetselectedCount(ID) ,Concat(Distinct Value,', '))

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.