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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

Calculate opening balance

Hi,

     I am trying to show opening balance. i am having month field

TBAL_CAL_MONTH

0

1

2

3

4

5

6

7

8

9

10

11

12

if i select 7th month it should show the value of 0-6 th month as opening balance

i tried below code but no luck

sum({<TBAL_CAL_MONTH={">=$(=MonthsStart(Date(Max(TBAL_CAL_MONTH))))<=$(=Max(Date(TBAL_CAL_MONTH)))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

plz suggest

thanks

27 Replies
Not applicable

for previous year

sum({<ACNT_FLEX_02={'Balance Sheet'},TBAL_Month={"$(=month(max(TBAL_Month)-1))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

add current year & you will get your expected output

arulsettu
Master III
Master III
Author

sorry getting zeros only

arulsettu
Master III
Master III
Author

any experts plz give some example it would be very helpful...

arulsettu
Master III
Master III
Author

i used this code but not getting exact result

sum({<TBAL_CAL_MONTH ={">=$(=MonthStart(max(TBAL_CAL_MONTH),-12))<=$(=max(TBAL_CAL_MONTH))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)+sum({<ACNT_FLEX_02={'Balance Sheet'}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

please suggest something

sunilkumarqv
Specialist II
Specialist II

Instead of Month u can take date then use it in exp

sum({<Date={"<=$(=max(Date))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

arulsettu
Master III
Master III
Author

hi

     i am having only month and year fields no date field

thanks

beckerv
Contributor II
Contributor II

Hi Arul,

just a general question:

As a balance sheet only shows the as-is figures of the current balance date you cannot sum up the monthly figures - different to P&L - to e.g. receive the balance sheet figures of a later month (e.g. Jan + Feb + March = March).

Therefore my question is:

How do you expect to receive the June opening balance sheet figures by creating sums?

For P&L figures that should work (if you have monthly figures available), for balance sheet figures it does not.

Best regards,

Viktoria

arulsettu
Master III
Master III
Author

in finance they keeping current month opening balance is summing previous months balance. so if need to see opening balance for jun then i need to sum all previous months balance. so it is opening balance for june