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: 
pedromsouza
Creator II
Creator II

Dual + Count <> Count ?!

Hi,

I was looking for an expression that would give me number and percentage in a pie chart and found this:

=dual( Num(Count(Distinct key),'#.##0') & '   (' & num((Count(Distinct key))/(Count(Total Distinct key)),'#.##0%') & ')',

Count(Distinct key) +(Count(Distinct key))/(Count(Total Distinct key))*100 )

It shows number and % correctly, but the count is wrong.

If I use the previous expression:

=Count(Distinct key)

I get a smaller value.

So, what's I'm doing wrong?

Regards,

Pedro.

Edit: the smaller value is the correct one.

Mensagem editada por: Pedro Souza

Qliking since '09
11 Replies
pedromsouza
Creator II
Creator II
Author

Good to know. Thanks!

Qliking since '09
pedromsouza
Creator II
Creator II
Author

That's correct! That's exactly what I wanted.

Thank you very much.

Qliking since '09