Skip to main content

Hi

 

I have a set of data with variables Loannum (integer), var1 (date), var2 (string).

 

What I want is to be able to compare the count of the strings from one month to the previous month like below

 

2011

March

Var2

 

2011

April

Var2

ABCA20145B151025C12202

 

Where A/A is the count where the string (Var2) equals A in March and A in April, A/B is the count where the string (Var2) equals A in March and B in April, etc...

 

I can use lookup to lag the date, but I run into an aggregation issue with the strings. I've attached sample data below.

 

Thank you!

2 answers
  1. May 6, 2015, 6:14 PM

    This is what I'm looking for but without manually creating the lag variable in the data before importing (as was done here). Var3 being the previous month and Var4 the previous string.

    This is what I'm looking for but without manually creating the lag variable in the data before importing (as was done here). Var3 being the previous month and Var4 the previous string.

0/9000