Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

atribute ch

hi all,

i want to retrive date field when a specific atribute has changed,

table looks somthing like below

 

iddate fromdate toatribute aatribute batrubute c
12301\01\1728\02\17aabbcc
12301\03\1715\05\17abbbcc
12316\05\1730\06\17abbzcc
12301\07\1701\10\17abbzcr

i want the 'date from' value where atribute a changed from aa to ab (01\03\17)

prefer doing it in the script

any ideas?

advanced thanks

Labels (1)
1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

2 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

Previous function might work for you:

Previous - script function ‒ QlikView

jpenuliar
Partner - Specialist III
Partner - Specialist III

Temp1:

Load * Inline

[

id, date from, date to, atribute a, atribute b, atrubute c

123, 01\01\17, 28\02\17, aa, bb, cc,

123, 01\03\17, 15\05\17, ab, bb, cc,

123, 16\05\17, 30\06\17, ab, bz, cc,

123, 01\07\17, 01\10\17, ab, bz, cr,

];

NoConcatenate

Load

id,

    [date from],

    [atribute a],

    If(RowNo() >1, If([atribute a] = previous([atribute a]),Null(), [date from])) as test

Resident

Temp1;

drop table Temp1;