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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cum. periods

When I do this formula:

=sum({<YEAR={"$(=MAX(YEAR))"}>}{<PERIOD={"$(=MAX(PERIOD))"}>}
(
If(REKENING>= 8000,
If(REKENING<= 8499,
(([KREDIT])/100)-(([DEBET])/100)
,0)))
-
If(REKENING= 8405,
(([KREDIT])/100)-(([DEBET])/100)
,0))

I get the answer about for the max year and the max period.

But I want to have a cumulative with all periods.

When I select period 4. I want the answer about period 1, 2, 3,  and 4. With this formula I only get about period 4.

How can I do that?

Labels (1)
2 Replies
MK_QSL
MVP
MVP

May be

=RangeSum(Above(sum({<YEAR={"$(=MAX(YEAR))"}>}{<PERIOD={"$(=MAX(PERIOD))"}>}

(

If(REKENING>= 8000,

If(REKENING<= 8499,

(([KREDIT])/100)-(([DEBET])/100)

,0)))

-

If(REKENING= 8405,

(([KREDIT])/100)-(([DEBET])/100)

,0)),0,RowNo()))

sunny_talwar
MVP
MVP

Try what Manish‌ just gave you, but in case it doesn't work, I suggest providing a sample and its expected output which would help us understand your requirement better.

Best,

Sunny