Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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
Author

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

swuehl
MVP
MVP

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])