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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate a value using the "Partial Sums" from Pivot Table

Hi,

I've been facing an issue when trying to get a calculated value. What I want is to calculate the percentage of each 'Num' in the 'Total'. Meaning, if we select the 'CARRCD'=DY, I wanted the following value to be presented in another column, (10/40)*100 .

error loading image

In order to calculate the field 'Num' I've used the formula

sum(aggr($(vNumTickets),CustomerName1, CARRCD))

so that it's possible to present the total sum of the field 'Num' when selecting the option 'Show Partial Sums' for the field 'CustomerName1'.

Since the Total is an information we get from the PIVOT Table, how can I perform that division using the value provided by the TOTAL?

Thank you very much for your time.

Mariana

2 Replies
Not applicable
Author

Does anyone has any tips?

Thanks in advance.

Regards,

Mariana

pablolabbe
Partner Ambassador
Partner Ambassador

sum(aggr($(vNumTickets),CustomerName1, CARRCD)) / sum(TOTAL aggr($(vNumTickets),CustomerName1, CARRCD))

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button! | Follow me on Linkedin