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

Total aggregation of dimension

Hello Guys,

I have a problem with total aggregation in dimension.Please check the attached and let help me to find the solution.

I want the total of Nb. Cust at.

Thanks

22 Replies
Anonymous
Not applicable
Author

Nima, I dont think i understand.  Can you ilustrate the result you want to achive?

Why do you have Nb.cust as a dimension instead of expression?

Not applicable
Author

Ok,

Here is the case:

If you look at the top of the pivot table you'll see the Year and then the measures.

If I add the Nb.Cust in the expr then it'll repeated for every single year which we don't want to.

I hope explain it clearly

Thanks,

Anonymous
Not applicable
Author

I think I understand.

What about faking the year dimension with set analysis?

Not applicable
Author

Thanks Marcus,

I had  done it before for my client but he did not lik the fake one. He want to have a real year on the top and the measures as the nested column.  

Nima,

swuehl
MVP
MVP

Maybe you could use an additional dimension with values 'Sales', 'Tons', 'Margin'  (created in the script).

Then use only one expression, in which you check /match() for your measure dimension value and pick() the appropriate aggregation function.

Up to this this will just rebuild what you already have. Adding a total for the horizontal dimension Year, and using a check for secondarydimensionality() should allow you to use your NB Cust aggregation in that separate column (the reused Total column).

Not applicable
Author

Could you pleae give me an example of the script?

Thanks

Anonymous
Not applicable
Author

Hi Nima

I made two ugly solutions that might give some ideas.

Not applicable
Author

Thanks for your help but I'm still missing the partial total

swuehl
MVP
MVP

Example attached.

Not applicable
Author

Thanks Swuehl,

That was a nice solution.

Thanks