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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setup Current and Previous period Amount at same row

Hi QlikView eprts,

I have source table with columns, Date, Account, Amount. Want to transform that to following format of Date, Account, Amount, PY AMT (for further calculations).

Tried to read source table in two different table and then those two resident table into a single table to get PY AMT, using Join and Concatenate, but didn't get expected results.

Appreciate any insights on the approach to do this.

Source Data

TDATEACCOUNTAMOUNT
1/1/2012A CONSUMER INVESTMENT14
1/1/2012B CONSUMER INVESTMENT157
1/1/2012C CONSUMER INVESTMENT351
1/1/2012D CONSUMER INVESTMENT25
1/1/2012E CONSUMER INVESTMENT13
1/1/2012F CONSUMER INVESTMENT28
1/1/2012G CONSUMER INVESTMENT49
1/1/2012H CONSUMER INVESTMENT0
1/1/2011A CONSUMER INVESTMENT7
1/1/2011B CONSUMER INVESTMENT78.5
1/1/2011C CONSUMER INVESTMENT175.5
1/1/2011D CONSUMER INVESTMENT12.5
1/1/2011E CONSUMER INVESTMENT6.5
1/1/2011F CONSUMER INVESTMENT14
1/1/2011G CONSUMER INVESTMENT24.5
1/1/2011H CONSUMER INVESTMENT0

Expected Format

TDATEACCOUNTAMOUNTPY AMT
1/1/2012A CONSUMER INVESTMENT147
1/1/2012B CONSUMER INVESTMENT15778.5
1/1/2012C CONSUMER INVESTMENT351175.5
1/1/2012D CONSUMER INVESTMENT2512.5
1/1/2012E CONSUMER INVESTMENT136.5
1/1/2012F CONSUMER INVESTMENT2814
1/1/2012G CONSUMER INVESTMENT4924.5
1/1/2012H CONSUMER INVESTMENT00

    

Thanks,

Abhay

10 Replies
MarcoARaymundo
Creator III
Creator III

Sorry