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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Table Total Sum

Hi friends,

I have stuck in a requirement see I have a table where I have opening balance and Closing balance with Sales field.Lets assume following table.

Month
OpeningSalesClosing
Jan15020160
Feb16050200
Mar20010220
Apr22080310
May31020400
Total150180400

as in the above table I have to calculate Total where for opening total is its starting value i.e. 150 and for Closing its last value i.e. 400 and for sales it is sum(sales) .

Does anyone has any idea how to solve this.

Regards

Bhawna    

Labels (1)
6 Replies
Anonymous
Not applicable
Author

Like the attached ?

I used a Chart of type Straight Table

On the Expression tab for the Expression Total mode I used :

First String

Sum   

Last String

gmoraleswit
Partner - Creator II
Partner - Creator II

Here is another solution using the Dimensionality function

Hope this helps

Regards!

Not applicable
Author

I need to use pivot table but thanks for replying I can use this in some another issue.
Not applicable
Author

My requirement is kind of different I need to use some extra field and Cross the column to a row so for me its difficult to put your suggestion.I am sharing a snapshot of my table,hope you will get idea how to do this.snap.png

I used Partial sum option thats why Total for opening and closing is showing sum of all value but I need first value for opening and last value for closing.

gmoraleswit
Partner - Creator II
Partner - Creator II

You can use the Dimensionality() function regardless of the number of dimensions you have

dimensionality.JPG.jpg

Dimensionality() should give you 0 for your grand totals row

Not applicable
Author

But then it will show the opening stock value in each dimension column,means in your example You are considering only A but when you one more dimension suppose B then it will show the value for B but I need separate column for Opening and Closing.