Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Count 2 columns, without overriding information

Good afternoon!

How do I count information from 2 columns, without undoing an information.

Below the percentage should give 57.1%, but in this expression, the status WOCOMP is canceled and is giving 50%.

Count({<[Status] = {'WOCOMP','CLOSE','RETURNED','ISSUED'},[MotivodaPostergação]={'CUSTOMER','MATERIAL','RESOURCES'}>}[Status])/Count({<[Status] = {'WOCOMP','CLOSE','DONE','RETURNED','ISSUED','SAFETY','INPRG','RTO'}>}[Status])

3 Replies
MVP
MVP

Re: Count 2 columns, without overriding information

What do you mean with 'undoing an information'?`

Your set expression shows two filters on fields and both need to be applied. The WOCOMP line does not have a valid value in field MotivodaPostergação, so it's not counted in your first aggregation.

Not applicable

Re: Count 2 columns, without overriding information

And how would be the expression to consider WOCOMP as a valid value in the MotivodaPostergação field?

MVP
MVP

Re: Count 2 columns, without overriding information

Are you looking for

Count({

<[Status] = {'CLOSE','RETURNED','ISSUED'},

[MotivodaPostergação]={'CUSTOMER','MATERIAL','RESOURCES'}

>

+

<[Status] = {'WOCOMP'}

>

} [Status])

/Count({<[Status] = {'WOCOMP','CLOSE','DONE','RETURNED','ISSUED','SAFETY','INPRG','RTO'}>}[Status])

Community Browser