Skip to main content
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