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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sarmie_Akintona
Contributor II
Contributor II

Pivot Table - Computation of Ratio of Subcategory

I am new to Qlik and would appreciate any help. I have the table as shown below.

Sarmie_Akintona_1-1634666291447.png

I wish to compute a new column as shown below:

Sarmie_Akintona_2-1634666568008.png

 

In essence, I want the new column to have Amount of the SubCategory Field divided by the total of the respective Category. Something like Amount(AA)/Sum(A), Amount(AAA)/Sum(A), Amount(AAAA)/Sum(A), Amount(BB)/Sum(B), Amount(BBB)/Sum(B), Amount(BBBB)/Sum(B), etc

 

I will appreciate any kind assistance

Labels (1)
1 Reply
Sarmie_Akintona
Contributor II
Contributor II
Author

For future reference: Was able to fix it using the chart script: 

Sum({<[SubCategory]=>}Amount)/Sum({<[Category]=>} Total<Category> Amount)

Sarmie_Akintona_0-1634676117683.png