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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

balances

I want to capture previous value of my closing account as opening account for the next month . scenario

YearMonthOpening balanceClosing Balance
2011Jan0237
2011Sep237445
2012Feb445679
2012Nov679
x
Day nx


Also date; i have about 16 months in which all other 4 months are merged into december. Find attached QVW ffile

15 Replies
petter
Partner - Champion III
Partner - Champion III

You can take advantage of the Above() function like this:

2015-03-26 #1.PNG

maxgro
MVP
MVP

bal2.qvw: failed to open

to set opening balance

source:

LOAD Year,

     Month,

     date(Date#(Year & '-' & Month & '-01', 'YYYY-MMM-DD')) as Date,

     [Closing Balance]

FROM

[http://community.qlik.com/thread/157634]

(html, codepage is 1252, embedded labels, table is @1)

where len(trim(Month))>0;

final:

load

  *,

alt(peek([Closing Balance]),0) as [Opening balance]

Resident source

order by Date;

DROP Table source;

1.png

Not applicable
Author

The value for closing balannce for the last month Dec 2013 isnt moved to the next year january. this is the major issue i have

Not applicable
Author

Hello Massimo,

This cool, but not really what i want. Find attached I have drill down in it and i just want the value of Dec closing bal. to be passed to Jan opening bal. on drill  down

petter
Partner - Champion III
Partner - Champion III

If you make sure to have a dimension which is a combination of year and month you will be able to span past years...

Jacek
Creator
Creator

We cannot open Your QVW file (bal2).

In set analyses You will not do it. You should in LOAD SCRIPT make right calculations and insert previous values in base date row.

petter
Partner - Champion III
Partner - Champion III

Actually the application with test data that I uploaded proves that there is no problem getting closing balance from the previous year. Have a look at that application. If you use a Pivot Table instead of a Straight Table you might have a problem with the Above() function IF your dimension grouping is not correct...

Not applicable
Author

Am having issues with uploading please download this link:

Dropbox - balance1.qvw

Thanks

Not applicable
Author

Give me a clearer scenario