Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count doesn't do it correctly

Hi everyone, i'am facing a new problem and it's a little hard to explain because of is complexity.

What i pretend is to count every REA where RaiserPlantID = Responsible when I've only one of the plants selected it's everything alright and the sum calculates correctly but the count not.

At red it's whats happening and green it's what is desired, so when the responsible = raiser is PlantResp when isn't is OthersResp, but the problem is when the Responsibility is between raisers and both are selected. With the table is easier to understand.

Untitledasdasdads.png

Has you can see in the next screen the id 936578 it's indirect selected but it doesn't count it but it sum is value.

Untitled.png

The 979 should count 44 and it count 43 but the sum includes 44 values!

My sum is:

=sum(if(RaiserPlantID = Responsible, (Auth*XRATE2USD),))

My count:

=Count(if(RaiserPlantID = Responsible, id,))

SAMPLE:

It's a bookmark saved with selection, if you export to excel, the bottom table you will see that exists 13 - REA 979 but qlikview only counts 10

4 Replies
venkatg6759
Creator III
Creator III

Can you share a sample app if possible .

Thanks,

Venkata

Not applicable
Author

Made an upload with sample data

venkatg6759
Creator III
Creator III

it only counts 10 because for REA 979 because out of 13 only 10 matches

when RaiserPlant ID =Responsible

if you want if statement in set analysis for Qty you can use

=Count({$<RaiserPlantID=P(Responsible)>}id)

Not applicable
Author

but if you analyse the data you will see that it's not true when you have both selected, 179A + 179B.

I've already tried with set analyses but the result was the same.