Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a field in a pivot table

Hello, I have a problem, ¿How can I create personalized calculations or subtotals in a pivot table?

For example, let's assume we have a dimension "month" (columns) and a dimension "Age Range" (rows). For age range the possible values are "child", "teenager", "adult" and "senior", I would like to sum only "child" and "teenager" to create a row named "Total Young people". How can I do this?

Thanks you, regards!

6 Replies
IAMDV
Master II
Master II

Please check the Dimensionality() function. This function returns 0 for the Total field and you can write your expression with string concatenation.

For example your expression :

Sum(People)

Then you can write :

IF(Dimensionality() = 0, 'Total Young people : '& Sum(People), Sum(People))

You can expand this logic by implementing Pick() & Match() to pickup the field name.

Cheers,

DV

www.QlikShare.com

Not applicable
Author

Hello, It didn't work with the Dimensionality()  function :s

IAMDV
Master II
Master II

Please can you post the sample application?

Thanks,

DV

www.QlikShare.com

Not applicable
Author

It's the PRM Table, thanks

Not applicable
Author

An example with excel here that show what exactly I want. I have three files, Separations, LeaversOwnDecision and Joiners, and two calculated files, partial and total variation. That is exactly that I want in Qlikview, create the two new values for the dimension "Recruit/Termination", exactly how you can see in excel table.

Regards.

whiteline
Master II
Master II

You can use similar trick:

http://community.qlik.com/message/252646