Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis all periods less than max selected period

I am creating a financial qlikview application.

Currently I have a Balance Sheet, a Income Sheet, and a General Ledger.

The Income Sheet and the general ledger can be used by period, for only one fiscal year at a time.

EX: Can select 3 to see only 3.

The Balance Sheet however needs all periods prior to the max fiscal period to show correctly due to the Opening Balance only being present on fiscal period 0

What would be the best way to write a set analysis to use on the balance sheet to tell it to take the balance for all periods less than the max selected period?

Have tried this formula, but it is returning no results:

=num(sum({<fiscalperiod = {'<=max(fiscalperiod)'}>}if(fiscalperiod=0,0,creditamt + debitamt) +openbalance), if(Nextparent<>'Assets','($#,##0.00);$#,##0.00','$#,##0.00;($#,##0.00)'))

1 Solution

Accepted Solutions
Not applicable
Author

I found the solution after digging through the community.

=num(sum(

{$< [Fiscal Period] = {"<=$(=Max([Fiscal Period]))"}>}

(if([Fiscal Period]=0,0,creditamt + debitamt) +openbalance)),

if(Nextparent<>'Assets','($#,##0.00);$#,##0.00','$#,##0.00;($#,##0.00)'))

View solution in original post

1 Reply
Not applicable
Author

I found the solution after digging through the community.

=num(sum(

{$< [Fiscal Period] = {"<=$(=Max([Fiscal Period]))"}>}

(if([Fiscal Period]=0,0,creditamt + debitamt) +openbalance)),

if(Nextparent<>'Assets','($#,##0.00);$#,##0.00','$#,##0.00;($#,##0.00)'))