Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Month and Prior Month in a new column

Hi dear,

How can i do it below?

Current State
KEYMONTHPRODUCT
10012012/01A
10012012/02A1
10012012/03XX

New State (that i need to do)

KEYMONTHPRODUCT PRIOR PRODUCT
10012012/01A
10012012/02A1A
10012012/03XXA1

Thank you

1 Reply
Gysbert_Wassenaar

In a straight table or pivot chart you can use the above() function: above(PRODUCT)

In the script you can use the previous() function: if(KEY=previous(KEY),previous(PRODUCT)) as PRIOR PRODUCT. You may have to create another table first if your source data isn't sorted on KEY first and MONTH next.


talk is cheap, supply exceeds demand