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: 
Not applicable

why is the calculation wrong?

Hello, everyone

I want to calculate the distinct account id for each salesman.If account id doesn't exist, I will calculate the distinct account name instead.But we can see from the result, the if expression is not a right answer.Why?

4 Replies
Not applicable
Author

the third expression wouln't be?

if (IsNull([count id]),[count name],[count id])

Not applicable
Author

I have tried the solution,but it doesn't work.

Anonymous
Not applicable
Author

I noticed that if Id is null also account name is null so maybe you should find another way to count them.

Find an attachment where in yellow column you can see that number of Id null is the same of the account name null.

Not applicable
Author

It happens to be that the id is all not null.From the expression result, the right answer should be 91,the same as count id, but the actual answer is the same as count name.Does the "if" function lose effect?