Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rvijayanth
Creator
Creator

How to count the first occurrence of a value in a column?

I have a table like this: 

IDTIDColor_ChangeDate
11Nodate 1
12Yesdate 2
13Yesdate 3
14Nodate 4
15Nodate 5
16Yesdate 6
17Yesdate 7
18Yesdate 8
21Nodate 1
22Yesdate 2
23Yesdate 3

 

I need to add a column "First_Color_Change" like shown below, which will tag the first time the column "Color_Change" has the value 'Yes' for each ID. 

IDTIDColor_ChangeDateFirst_Color_Change
11Nodate 1No
12Yesdate 2Yes
13Yesdate 3No
14Nodate 4No
15Nodate 5No
16Yesdate 6No
17Yesdate 7No
18Yesdate 8No
21Nodate 1No
22Yesdate 2Yes
23Yesdate 3No

 

Labels (1)
0 Replies