Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding Partial sum in Pivot table

Hello Friends,

I appreciate your time.

I have a pivot table in which I need to subtotal by ContractID and ContractName. But my pivot table is not working as expected. Kindly share your ideas to get a solution.

I have attached the application for your reference.

Thanks,

Kiru

7 Replies
Not applicable
Author

Hello Friends,

Please let me if you has any solutions!

Kind regards,

Kiru

Not applicable
Author

Hi Kiru,

Please see attached.

If this is what you are looking for, you can mark it as Correct answer.

-Hemanth.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Remove the aggr() from your expression. It's unneeded because it's the same as the chart dimensions. Your expression should just be:

sum([SALESAMOUNT])

-Rob

Not applicable
Author

Hello Rob,

I appreciate your time and thanks so much. I got the result and it was a sample. In my real application I got another couple of fields included as a dimension,so will it affect the sum of sales?

Say for eg:

Dimensions used:

Contract ID

Contract Name

Plan

Utilization Type

Product NDC

Payment Period

# of RXs

Units

Expression :

=aggr(sum([salesmaount]),[Contract ID],[Contract Name ],[Plan],[Utilization Type],[FORMULARYID],[CalendarPaymentPeriod])

Kindly let me know

Kind regards,

Kiru

ecolomer
Master II
Master II

is this?

p02.png

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If your aggr() dimensions are exactly the same as the chart dimensions, there is no need to use aggr(). If you want to aggregate by dimensions different than the chart, that is when you need to use aggr() or TOTAL.

-Rob

Not applicable
Author

Hello Hemanth,

Thank you, but still I am getting some issue, could you kindly have a look at it and let me know because I have another couple of fields associated with it.

I have attached the application for your reference.

Kind regards,

Kiru