Skip to main content
Announcements
Qlik Announces Qlik Talend Cloud and Qlik Answers: LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If match statment?

Hi guys,

I need to solve this problem and cant get my head around it,

I have a statight table that looks like this. I need a calculation that shows the value 1 if a single SSN has the value smoke and snuff on a matching date. Ive tryed a if match statment like this but cant get i right

if(Match(Signed,SSN, Rökare and Snusare='1', 1) 

   

SSNSignedSmokeSnuff
5656562015-07-01 10:381-
5656562015-07-01 10:38-1

Any ideas?

4 Replies
Anonymous
Not applicable
Author

can we try like:

if(Signed='1' or SSN='1' or Rökare='1' or Snusare='1', 1)


or depend on what you need


if(Signed='1' and SSN='1' and Rökare='1' and Snusare='1', 1)

buzzy996
Master II
Master II

are u looking for this?

exp.PNG

sunny_talwar

Not really sure how you data is structured, would you be able to prepare a small sample?

Mark_Little
Luminary
Luminary

Hi,

Shiva's proposed solution seems to show the correct answer, but as Sunny has suggested a small data set or QVW would help, as I would suggest looking at the data model, I would normally expect the  to see you example as one line.

SSNSignedSmokeSnuff
5656562015-07-01 10:3811

Then the set analysis would be easy, or even script a flag.

Mark