Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total count distinct produce wrong sum


Hi all,

i really don't succeed in explaining the behaviour of qlikview in the attached document.

The automatic sum (TOTAL) on the column where i perform a count(distinct...) produce a wrong automatic sum.

Can someone help me to understand this behaviour and to find a solution?

Thanks in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The expression is used at the total level too. So it returns the overall count distinct. There is no automatic sum, because it's an automatic count distinct (which is correct). If you want to sum the rows you can do two things.

1. Set the total mode of the expression to Sum of Rows;

2. Use sum(aggr(count(distinct number),category)) as expression.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

The expression is used at the total level too. So it returns the overall count distinct. There is no automatic sum, because it's an automatic count distinct (which is correct). If you want to sum the rows you can do two things.

1. Set the total mode of the expression to Sum of Rows;

2. Use sum(aggr(count(distinct number),category)) as expression.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks, I resolved using the first option.