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: 
Dmitryromanov23
Contributor III
Contributor III

I need to create a new column. In which I need to put the numbers by condition

Good afternoon, everyone. I'm looking for a solution to this problem: I need to create a new column. In which I need to put 1. But! If this ID has "justified_warning" and "justified_repetition" statuses, then "justified_repetition" status should have 0 in the new column. How can I do this in qlik?

Like this

Dmitryromanov23_0-1681028799291.png

 

Labels (3)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can crete a temporary field to store ids that has loeaded a justified_warning, so when a justified_repetition is loaded you can check this field values. like:

LOAD
  id,
  status,
  If(status='justified_warning', id) as checkId,
  If(status='justified_repetition' and Exist('checkId',id)
    ,0 , 1) as new_column
From/resident...;

DROP Field checkId;

View solution in original post

1 Reply
rubenmarin

Hi, you can crete a temporary field to store ids that has loeaded a justified_warning, so when a justified_repetition is loaded you can check this field values. like:

LOAD
  id,
  status,
  If(status='justified_warning', id) as checkId,
  If(status='justified_repetition' and Exist('checkId',id)
    ,0 , 1) as new_column
From/resident...;

DROP Field checkId;