Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jcharles
Contributor III
Contributor III

Total does not add up

Good day

I have a chart where every column's total adds up correctly except for the last column which should show the total as R384.88 but it shows R389.98. I don't know why. Can someone help please.

KEYWORDNOAMOUNTAMT PER NONO OF LEADSCOST PER LEAD
TOTAL163R1,767,380.59R10,842.834,592R389.98
Sun45R627,008.68R13,933.531,852R338.56
Move14R297,787.00R21,270.50554R537.52
Kaap35R213,786.72R6,108.19642R333.00
Family6R205,650.00R34,275.00379R542.61
krag6R111,055.50R18,509.25198R560.89
Goal6R90,732.60R15,122.10255R355.81
Iso18R80,598.01R4,477.67180R447.77
Ilanga17R69,186.35R4,069.79165R419.31
Value3R38,181.15R12,727.05102R374.33
Sonto12R24,771.86R2,064.3246R538.52
Nurse1R8,622.72R8,622.7211R783.88
Bona0R0.00-54R0.00
Drum0R0.00-38R0.00
Rights0R0.00-38R0.00
You0R0.00-38R0.00
New0R0.00-14R0.00
World0R0.00-2R0.00
Love0R0.00-2R0.00
Mthatha0R0.00-2R0.00
Khosi0R0.00-11R0.00
Kick0R0.00-1R0.00
City0R0.00-1R0.00
Times0R0.00-1R0.00
Day0R0.00-6R0.00
1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

And in the NO OF LEADS column:

Are you using COUNT(DISTINCT LEADNO) or COUNT(LEADNO)?

This would explain the wrong total if there are some LEADNO that exists for more than one KEYWORD. It would then only be counted once in the total.

If sum(AMOUNT) / COUNT( LEADNO) does not work, try

sum(AMOUNT) / sum(aggr(Count(Distinct LEADNO),KEYWORD)))


Regards
SKG

View solution in original post

14 Replies
Anonymous
Not applicable

Check in the properties whether you have used "Expression Totals" or Sum Totals.

jcharles
Contributor III
Contributor III
Author

I'm using the expression total. I cannot change it to sum of rows total because then it gives me R5 232.20 which is also incorrect.

gmoraleswit
Partner - Creator II
Partner - Creator II

Anonymous
Not applicable

Send me your logic to get R384.88

simenkg
Specialist
Specialist

What does your expression look like?

Try the expression:

[AMOUNT] / [NO OF LEAD]

richard_pearce6
Luminary Alumni
Luminary Alumni

You could try an aggr()

Avg ( Aggr ( <Your Expression> , KEYWORD ) )

Richard

jcharles
Contributor III
Contributor III
Author

R1767380.59 / 4592 = R384.88

sum(AMOUNT)  / COUNT(DISTINCT(LEADNO))

jcharles
Contributor III
Contributor III
Author

I'm using :

sum(AMOUNT) / COUNT(DISTINCT(LEADNO))

Not applicable

If you have tried all of the above it may mean that you have a disconnect in your data somewhere.