Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

benjamin_buth
New Contributor

Sums in Pivot table with If formula

Hi,

I created several a formulas with an If formula within. The calculated values for each single item is correct, but the sum incorrect.

Can someone tell me why?

In the first Column, you can see how many Items are found --> this line is correct (no if calculation)

Second column shows the age of every Item --> no if formula, calculation correct

Third Column: Doors calculation correct (IF Formula, but not one items, where this if formula is necessary) --> Calcuation for VA Repairs incorrect (the sum can not be taller then the sum of the second column, as this is a part of the total aging in the second column)

Fourth Column: If calculation give values not equal to 0 for every item, but the sum is 0.

Thanks for your help and BR from Germany

Benjamin

3 Replies
MVP
MVP

Re: Sums in Pivot table with If formula

See here

Sum of rows in pivot tables ‒ QlikView

In short you need to use

Sum(Aggr(YourExpressionHere, YourDimension/s))

benjamin_buth
New Contributor

Re: Sums in Pivot table with If formula

Hi,

sounds good, but I get always a mistake in the formula:

sum(aggr({$<Country__c={Germany},Status={qualified},IsConverted={0},IsDeleted={0},Business_Type__c={"Doors","VA Repairs"},[Lead.LeadSource]=-{"Other","Initiated: Prospecting"},OldValue={"qualified"}>}[LeadHistory.CreatedDate.autoCalendar.Date]))

Seems like there something missing, but I don´t know what...

MVP
MVP

Re: Sums in Pivot table with If formula

This was your measure or dimension?