Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
cristian_av
Creator III
Creator III

Calculated Dimension for Pivot Table

Hi

I want to to create a table like the one shown in the image below.

I have the following dimensions:

Day

Week

BultoStock

KiloStock

Sin título.png

Any idea how to do this?

I think this can be done with calculated dimension, but cannot make it work!

1 Solution

Accepted Solutions
rupamjyotidas
Specialist
Specialist

In Dimension for sum()

=aggr(sum(BultoStock),Especie)

=aggr(sum(KiloStock),Especie)

Also you need the following dimension

Especie

day/week

Expression :

Sum(BultoStock)

Thanks

View solution in original post

6 Replies
sunny_talwar

Would you be able to share some sample raw data and explain the expected output?

rupamjyotidas
Specialist
Specialist

In Dimension for sum()

=aggr(sum(BultoStock),Especie)

=aggr(sum(KiloStock),Especie)

Also you need the following dimension

Especie

day/week

Expression :

Sum(BultoStock)

Thanks

cristian_av
Creator III
Creator III
Author

Thanks!

It works, but I can't show the Totals for the grouped dimensions. Any idea about how to do it?

qv2.png

If I use the "Show partial Sums", I get the following:

qv3.png

I've tried drag&drop but cannot make it work!

rupamjyotidas
Specialist
Specialist

Totals for the group dimension won't be possible, as Totals works only for Expressions.

cristian_av
Creator III
Creator III
Author

I Solved it by putting another pivot table over the principal one.

Then I've hide the borders, change the background color.. and nobody will notice it hehe

rupamjyotidas
Specialist
Specialist

. Problem might come when users does selections. So test and Test:)