Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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?

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

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