Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ramkrishna86
Contributor II

Sum in Qlik Sense pivot table

Hi,

I need your help regarding below functionality. I have data in pivot table as below-

Data.JPG

What i want is Begining of next month should be ending of previous month as below-

Pivot.JPG

How can i do this, i have attached QVF file.

Thanks for your help!

1 Solution

Accepted Solutions
MVP
MVP

Re: Sum in Qlik Sense pivot table

I think you don't want to use Sum(A) in the before function

RangeSum(RangeSum(Before(Sum(A)-Sum(B)-Sum(C)+Sum(D)+Sum(E)+Sum(F)-Sum(G)+Sum(H), 1,

ColumnNo())), First(Sum(A)))

Try this:

RangeSum(RangeSum(Before(-Sum(B)-Sum(C)+Sum(D)+Sum(E)+Sum(F)-Sum(G)+Sum(H), 1,

ColumnNo())), First(Sum(A)))

6 Replies
MVP
MVP

Re: Sum in Qlik Sense pivot table

May be try this

Beginning

RangeSum(RangeSum(Before(Sum(B)+Sum(C)-Sum(D), 1, ColumnNo())), First(Sum(A)))

Ending

Column(1) + Column(2) + Column(3) - Column(4)

ramkrishna86
Contributor II

Re: Sum in Qlik Sense pivot table

Hi Sunny,

This only works for first two date in pivot table, I want this functionality for complete pivot table.

Note: Range Sum function not works in pivot table as works in other chart.

Thanks!

MVP
MVP

Re: Sum in Qlik Sense pivot table

Really? Looks like the numbers are matching for me

App Screenshot

Capture.PNG

vs. your screenshot

Capture.PNG

Where is the difference?

ramkrishna86
Contributor II

Re: Sum in Qlik Sense pivot table

Hi Sunny,

I tried the same but can't get result, could you please suggest where i am making mistake.

I have attached QVF file.

Thanks!

MVP
MVP

Re: Sum in Qlik Sense pivot table

I think you don't want to use Sum(A) in the before function

RangeSum(RangeSum(Before(Sum(A)-Sum(B)-Sum(C)+Sum(D)+Sum(E)+Sum(F)-Sum(G)+Sum(H), 1,

ColumnNo())), First(Sum(A)))

Try this:

RangeSum(RangeSum(Before(-Sum(B)-Sum(C)+Sum(D)+Sum(E)+Sum(F)-Sum(G)+Sum(H), 1,

ColumnNo())), First(Sum(A)))

ramkrishna86
Contributor II

Re: Sum in Qlik Sense pivot table

Thank you So much Sunny