Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

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
Contributor II

Re: Problem with sum expression

Try this

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

diego_a_barboza
New Contributor III

Re: Problem with sum expression

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?

Support
Support

Re: Problem with sum expression

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 don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.