Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sub Totals in Pivot Table

Hi All

I have a requirement where I am using expressions for amount and sale as:

Amount:

Num(sum(aggr(avg(MRC11),[Account Number],[Description])) ,'$#,##0.00'),

Sale:

Num(Aggr(SUM(Net),[Account Number],[Description]) ,'€#,##0.00'),

If I am applying above expressions with aggr I am getting null values.Please help me with this.

ExpectedAmountActualAmountExpectedSaleActualSale
22221212
34341212
343422
Total=56Total=-Total=26Total=-
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try simple Sum(DISTINCT Net)

And then check partial sum from presentation and then show me the image

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

19 Replies
vinieme12
Champion III
Champion III

why not format it in the Number tab instead of Num()??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

try

Num(sum(Aggr(SUM(Net),[Account Number],[Description]) ),'€#,##0.00')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
albertovarela
Partner - Specialist
Partner - Specialist

Hello,

No sure why you have duplicated records for same Account and Description but assuming that Sales and Amounts are the same this might work. See attached app

Anonymous
Not applicable
Author

Hi Vineeth

I have multiple currencies so I cannot format in number tab and the formula you gave is not giving expected result.It should give 12+12+2=14 but it is giving 26

Anonymous
Not applicable
Author

Hi Alberto

I am not unable to open your attachment as I am using Personal Edition.Data is like that they are not duplicated records

albertovarela
Partner - Specialist
Partner - Specialist

Hope this helps

Anonymous
Not applicable
Author

Actually this is the problem I need 22+22 as 22 itself that I am getting but if I have 3 sites with sale as 22,22,12 it is giving null value instead of giving 22+12

albertovarela
Partner - Specialist
Partner - Specialist

I used the data on your spreadsheet. I think it does what you are asking for...look at the CountryPlace site for Account ABCD1. subtotal.png

Anonymous
Not applicable
Author

Sorry for my confusion I am attaching a image according to my requirementqlikimg.PNG