Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulinhok14
Creator
Creator

TOTAL expression not counting correctly

Hello dears!

I have an app in which I want to create a pie chart with relative classification, in %, for a specific field.

My field called "_Essentiality" has binary classification (0/1) and I want to count my Key field (%CompoundKey) for each of these classifications, having percentage for each class, example:

_Essentiality Relative Count
0 97,3%
1 2,7%

 

But the problem is, when I try to use TOTAL expression in order to have my relative share, my TOTAL count doesn't match with the sum of Keys in each classification (see attached image):

qlik error.png

As you can see, my count considering Dimension totals 49055 and my total count shows 49030, so when I try to create the A / B in order to have 0-100% sum, my "0" classification become, solely, more than 100%.

I've also tried to use ALL expression, without success.

Any ideas?

Labels (1)
2 Replies
WaltShpuntoff
Employee
Employee

I am assuming that your field %CompoundKey is a record key.

Whenever you are counting record keys - you always have to use Distinct.

Give that a try and post results.

hth

-ws