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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregate problem

Hi,

I have the following formula in a pivot table:

if(Sum( total <Clienti.CliRiferimento> if(right(Competenza,4) = $(vAnnoRiferimento)-1, FatNetto_AP, 0))>0,

if(sum(total <Clienti.CliRiferimento, CoGe> if(right(Competenza,4) = $(vAnnoRiferimento)-1, FatNetto_AP))=0,

(sum(FatNetto))

)

)

the pivot result as this:

error loading image

so the total are wrong in all column. If I change the table to stright and set Sum of Rows as total is working fine.

I tried some sum(aggr(.... but without getting the total running.

Can someone help?

Thanks!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I can't see what dimensions your table uses, so all I can tell you is the general approach:

sum(aggr(YourCurrentExpressionHere, YourDimension1, YourDimension2, etc.))

View solution in original post

2 Replies
johnw
Champion III
Champion III

I can't see what dimensions your table uses, so all I can tell you is the general approach:

sum(aggr(YourCurrentExpressionHere, YourDimension1, YourDimension2, etc.))

Not applicable
Author

Hi John,

sorry I was in hurry so i didn't put enought information to explain what i need.

I attach a QV with the data example. The scenario is:

I need to divide the customers in 3 categories: New, New on Existing, Existing. The meanings are:

- New = For customers that have sales = 0 in year 2009 I should show the sales of 2010 (month by month)

- New on Existing = For customers that have sales > 0 on year 2009 I should show the amount of sales only for the products where the total sales in 2009 = 0

- Existing = sales 2010 - New on Existing - New

Hope that now is clear.

Thanks