Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with an expression...(Calculation)

Hi there,

I have a data field labeled "Document Type" with eight different values, each value corresponding with a document type. I need to define an expression that counts the number of two different document types which are in the same field , and then divides them to get a ratio between them.

Any ideas?

Thanks in advance...

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Maybe this?

count({<"Document Type"={'Type A'}>} "Document")
/count({<"Document Type"={'Type B'}>} "Document")

View solution in original post

3 Replies
johnw
Champion III
Champion III

Maybe this?

count({<"Document Type"={'Type A'}>} "Document")
/count({<"Document Type"={'Type B'}>} "Document")

Not applicable
Author

Excelent, it works!

thanks a lot John

Not applicable
Author

count( {< [Document Type] ={'A'} >} value)
/
count( {< [Document Type] = {'A','B'} >} value)

... and...

count( {< [Document Type] ={'B'} >} value)
/
count( {< [Document Type] = {'A','B'} >} value)