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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
AbhijitBansode
Specialist
Specialist

Working with loaded data

Hi ,

I'm generating a table below by doing some calculations in QlikView:

KeyAs of termTermType
1012009 1st term2009 1st termCurrent
1022009 2nd term2009 2nd termCurrent
1032010 1st term2010 1st termCurrent
1042010 2nd term2010 2nd termCurrent
2009 1st term2008 2nd termPrevious
2009 2nd term2009 1st termPrevious
2010 1st term2009 2nd termPrevious
2010 2nd term2010 1st termPrevious


Now my requirement is to update keys of this table when Type=Previous, depending upon the values of other column.

e.g.

1]When type=Previous, AsOfterm=2009 1st Term, Term=2008 2nd term

on this row, QlikView Query executer should serach for the values of Term (here 2008 2nd term), find the matching value in the AsOfTerm column and when the mathch is found , that record's key value should be copied to the current row. here key is updated as -, because 2008 2nd term value is not present in AsOfTerm column.

2] When type=Previous, AsOfterm=2009 2nd Term, Term=2009 1st term

here key is updated as 101

Below is ths expected O/P table:

KeyAs of termTermType
1012009 1st term2009 1st termCurrent
1022009 2nd term2009 2nd termCurrent
1032010 1st term2010 1st termCurrent
1042010 2nd term2010 2nd termCurrent
-2009 1st term2008 2nd termPrevious
1012009 2nd term2009 1st termPrevious
1022010 1st term2009 2nd termPrevious
1032010 2nd term2010 1st termPrevious


can anybody guide me, how to achive above requirement?

0 Replies