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

Sum(Total <DImension> sales) is not working

Hi

I have issue working with Sum(Total <dimension> Sales). i attached the sample file.

Thanks

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Not sure I'm following, but the general pattern for "sum of rows" totals in a pivot table is this:

sum(aggr(your expression, your dimensions))

Or in your case:

sum(aggr(sum(total <Company> Sales),Display,Company))

Is that what you're looking for?

I think it should also work fine even if you remove Company as a dimension in your pivot table.

View solution in original post

8 Replies
sparur
Specialist II
Specialist II

Hello, marta.

change expression on:

Sum(Total <Display> Sales)

Not applicable
Author

Hi sparur,

Thanks for the reply but the total that i wanted is by Display dimension with total by company.

eg. Display Total by Company

Malaysia Company (100+300) = 770+237

Not applicable
Author

Hi sparur,

Please ignore the earlier reply

Thanks for the reply but the total that i wanted is by Display dimension with total by company.

eg. Display Total by Company

Malaysia Company (300+100) = 770+237 2210

Not applicable
Author

Hi this gives you the figures you are looking for.

Hope this is the answer you are looking for,

Regards,

Neil

Not applicable
Author

Hi Neil,

Thanks for the reply. The row level is what i wanted. but if you see the partial sum is not showing the correct result.

Another thing is when roll up to Display dimension view, the result is not correct too.

Regards,

Martha

johnw
Champion III
Champion III

Not sure I'm following, but the general pattern for "sum of rows" totals in a pivot table is this:

sum(aggr(your expression, your dimensions))

Or in your case:

sum(aggr(sum(total <Company> Sales),Display,Company))

Is that what you're looking for?

I think it should also work fine even if you remove Company as a dimension in your pivot table.

Not applicable
Author

Hi John,

That's what i'm looking for. Thanks alot.

Regards,

Martha

Not applicable
Author

Hi John !
Sorry to asked you. But I really can not undestand this.
I have a very simple pibot table.
But the TOTALS are not working. Can you help me please ??


This is the expression:

Sum( {$<Año={$(=Max(Año) )},   MesNro = {">=1 <=$(=Max(MesNro))"} >} TO )    

/

  Sum( TOTAL< RTM_ORIG>  {$<Año={$(=Max(Año) )},   MesNro = {">=1 <=$(=Max(MesNro))"} >} TO )

As you can see the subtotal 4,45% is wrong... I do not know what to do.