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: 
olivier_vincon
Partner - Contributor II
Partner - Contributor II

Problem with sum expression

Dear all,

I have a problem with this expression :

= sum(if([VOY.EPFCLE] <> 0, 1, if([PLA.EPFCLE] <> 0, 1, 0)) -> result 834

-> expected result 833

But in this case PLA.EPFCLE is always = 0 and if I do sum(if([PLA.EPFCLE] <> 0, 1, 0)) -> I have 0

So we are agree that my formula is equivalent to  : sum(if([VOY.EPFCLE] <> 0, 1, 0) and I do it, I have the result 833 what is expected !!

VOY.EPFCLE is a key and never null so it 's not a problem like it. There is also no double value

It is very strange. It's like bug

Is there a way to explain it and maybe something to test ?

Best regards,

Mike

Labels (1)
3 Replies
bharathadde
Creator II
Creator II

Try this

= sum(if([VOY.EPFCLE] = 0, if([PLA.EPFCLE] =0, 0, 1),1) 

diego_a_barboza
Creator
Creator

What do you get if you use the following expression:

RANGESUM(

COUNT(DISTINCT {< [VOY.EPFCLE] -= {0} >} [VOY.EPFCLE])

COUNT( DISTINCT {<  [VOY.EPFCLE] = {0} , [PLA.EPFCLE] -= {0} >} [PLA.EPFCLE])

)

Is there any combination of selections where you may have a valid value on PLA.EPFCLE and no valid values on VOY.EPFCLE?

Brett_Bleess
Former Employee
Former Employee

Did either of the posts address the issue?  If so, be sure to give them credit by clicking the Accept as Solution button on any that did help.  If you figured it out yourself, please post what you did and mark that as the solution.  If you require further help, please provide additional information.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.