Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hammermill21
Contributor II

Count two different expressions

Hello,

I have to data points, one is the EP# and the other is a STANDARD. I need to count all the EP# that pertain to The STANDARD that has EC in them. 

SO I have:

STANDARD:      EP#

EC.02.01.10      EP 9

LS.02.01.10      EP 10

EC.02.01.10      EP 11

LS.02.01.10      EP 12

LS.02.01.10      EP 13

EM.02.01.10      EP 14

LS.02.01.10      EP 15

So in my last question I was shown how to count the standards that have EC in them:  Count( {<STANDARD={'EC*'}>} STANDARD) and I tried to add to it for the EP# but nothing is working. I check all the threads but didn't find anything that really worked.

Thank you

1 Solution

Accepted Solutions

Re: Count two different expressions

May be this

Count({<[UMHC SYSTEM]={'100%'}, CHAPTER = {'EC'}>} [UMHC SYSTEM])/16

28 Replies

Re: Count two different expressions

May be this

Count(DISTINCT {<[EP#] = P({<STANDARD={'EC*'}>})>} [EP#])

hammermill21
Contributor II

Re: Count two different expressions

Hey Sunny,

For some reason that isn't working

Re: Count two different expressions

Can you share a screenshot of the expression? One thing I can think of is that have you just copy pasted my expression? May be the field names are different....

hammermill21
Contributor II

Re: Count two different expressions

Capture1.PNG

Re: Count two different expressions

Don't see any obvious issues with the expression.... What is the expression giving you? 0s? Nulls? Incorrect output?

hammermill21
Contributor II

Re: Count two different expressions

Incorrect output, it's showing 3000 when it should be 188. It seems like it's not counting only the ones that have "EC".

Re: Count two different expressions

Try double quotes :

Count( {< STANDARD = {"EC*"} >} STANDARD)

Re: Count two different expressions

Just read the question properly but ditto try double quotes

Count(DISTINCT {<[EP#] = P({<STANDARD={"EC*"}>})>} [EP#])

Digvijay_Singh
Honored Contributor III

Re: Count two different expressions

I think double quote is essential from Nov rel onwards

Community Browser