Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated collumn in a pivot table

Hello,

In a pivot table in the dimensions I have company names, in the the rows i have the years. This table shows the sales evolution.

How can I add a collumn at the end of the years to display the ratio of the last two years?

Thank you in advance!

1 Solution

Accepted Solutions
Carlos_Reyes
Partner - Specialist
Partner - Specialist

No problem,

Here you have a small example.

Hope it's useful.

View solution in original post

6 Replies
Carlos_Reyes
Partner - Specialist
Partner - Specialist

If you have Years as columns (crossed field), then the only possibility I can think of (using the same chart and not creating a new one that is placed at the end of the first) is to use Dimensionality to define the expression that displays the ration of the last two years in the proper subtotal column. Check the QlikView help and play with that funtion in your table.

Your expression should be something like this:

If ( Dimensionality = X, Expression for the last tow years, Current Expression)

EDIT... Perhaps this little discussion can help you understand that function a little bit more:

Understanding the dimensionality function in qlikview

Not applicable
Author

Hello Carlos,

Didnt think of Dimensionality, will try it and get back to you!

Thanx a lot for extremely prompt reply!

Regards

On Jan 27, 2014 7:13 PM, "Carlos Alberto Reyes Díaz" <

Carlos_Reyes
Partner - Specialist
Partner - Specialist

No problem,

Here you have a small example.

Hope it's useful.

Not applicable
Author

Your solution seems to be perfect!

The only problem im having is that the period dimension is a concat of two fields and one of them is a string.

Find attached an example application.

I have added the last column in a separate straight table.

Not applicable
Author

Thanks again Carlos, its working, it's just that the partial sum option wasnt checked!

Regards

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Hi Hero,

I'm glad it worked for you.  Only one little favor...

¿Can you mark the posts as answers and helpful so others can find faster responses?

Regards