Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table sums/totals

I have a pivot table where there are a number of groupings and I want totals for each grouping.

The problem is, that the totals are using the expression to calculate the totals.

As opposed to a "Straight table" you cannot specify in a pivot table how the totals are calculated.

In straight tables, you can specify "Sum" rather than "Expression" for the total calculation.

Is there anyone who can help me with this?

It is quite difficult to explain in few words, so I have included a sample with the problem.

Best regards

Steen Olesen

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi There,

Try the below expression in your Pivot table:

               SUM(AGGR(max(Sales) * (Max(StockLevel)), ProductSubGroup, ProductGroup))

I think that is what you looking for right?

Dennis.

View solution in original post

3 Replies
Not applicable
Author

Hi,

Maybe it's not the perfect solution,

I think you need to do the expression on the script end the do Sum on the layout.

See the attached qvw.

Hope it help.

Not applicable
Author

Thanks for your quick reply. However, the sample was a strip-down version of my real application trying to illustrate the problem. Unfortunately the calculations cannot be done at load time, since the columns in my real application are based on "set analysis" that depends on selections made by the user.

Anonymous
Not applicable
Author

Hi There,

Try the below expression in your Pivot table:

               SUM(AGGR(max(Sales) * (Max(StockLevel)), ProductSubGroup, ProductGroup))

I think that is what you looking for right?

Dennis.