Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
StefanE
Contributor III
Contributor III

Spread totals over dimension values

Good Day Everyone,

This is probably a pretty basic question: 

As shown in the example below, I want to spread out the Total of my "Products" Dimension, in this case, per month: 

Stefan29_0-1631177969768.png

So what I would want to display is the Product A, Product B and the Total per month.

Is this possible in QS pivot table or do I need to use a different approach?

Apologies if there's an existing thread on this topic.

Kind regards

Stefan 

6 Replies
MayilVahanan

HI Stefan,

Try like below

In script , bring one dummy field 

Load * inline

[

Dim

1

2

];

In front end, try like below

Dim1: Year

Dim2: If(Dim=1, 'Product Total', Products) 

Label as Products

Dim3: Month

Exp: Urexpression

Now, if you expand the Year, You can see additional value "Product Total" and if you expand it, you can see all the months & its total values.

Something like below

MayilVahanan_0-1631180000961.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
stevejoyce
Specialist II
Specialist II

In a pivot table properties, for each Dimension, you can "Show totals".  Is that what you are trying to enable?

stevejoyce_0-1631182708336.png

 

StefanE
Contributor III
Contributor III
Author

Hi Mayil,

Thanks so much for your reply! Since it's not my application I rather don't mess with the script. Is there a way to do it on the front end?

StefanE
Contributor III
Contributor III
Author

Hi Steve, I've got the totals for products in pivot table. What I know want is the products total for each month. The thing I get is the products total for all months. 

stevejoyce
Specialist II
Specialist II

Maybe i'm misunderstanding, but if you enable Show totals on your Product dimension also, that sounds like what you want?...

Currently you have Show totals on your Month dimension only.

StefanE
Contributor III
Contributor III
Author

I highlighted both totals for you:

Stefan29_0-1631195106658.png

No Product Total per month, unfortunately