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: 
paulyeo11
Master
Master

Balance sheet expression can it be using 1 expression for MonthYear ?

Hi All

I have a GL Table for Balance Sheet which display correct result.

GL_CODE.. ......................................Aug 2012.......................Sep-2012

10000          CAPITAL          ...........................$878900000.00.....          $878900000.00

10030          RETAINED EARNINGS...$0.00          .......................$0.00

20006          MOTOR VEHICLES.........$192784225.00.....          $192784225.00

.

For Aug 2012 expression as below :-

=money(fabs(if([Exec P&L Level] = 's','',Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-8),'YY MMM'))"}, month = ,year=>}[Amount])), $(vCurrency)))

For Sept 2012 expression as below :-

=money(fabs(if([Exec P&L Level] = 's','',Sum({$<YearMonth = {"<=$(=Date(addmonths(Max({$}[YearMonth]),-7),'YY MMM'))"}, month = ,year=>}[Amount])), $(vCurrency)))

The reasons i need to use addmonths , is because for Balance GL_DATA , i need to sum up all the data till Sept 2012 data. in order to get the Balance sheet amount for Sept 2012.

My issue of above approach is :-

1. Each column i need a different expression.

2. For 12 column report i need 12 different expression.

3. if i need to make change of expression formula , i need to change 12 expression.

May i know , it there any way i can change my data structure , so that i can make use one expression to get my balance sheet amount ?

Enclsoed my sample QV doc for your reference.

Paul

10 Replies
paulyeo11
Master
Master
Author

Can some one help me with one expression , how to display last 14 month amount ?