Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excluding values from Expressions

I'm very new to Qlikview, so newbie apologies

I have a field in my data called P/N. The values in the field for each row of data are either P, N or E. I would like to draw a pie chart but excluding the Es (i.e. it will have two segments, either P or N)

I've started with my Expression as    TextCount ([P/N])  but I'm not sure how to go about excluding all the Es.

Any assistance would be very appreciated.

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

TextCount (if([P/N]) <>'E',[P/N]) )

Sunil Chauhan

View solution in original post

3 Replies
its_anandrjs

Hi Jenark,

See the attachment sample file for clearity. On the example i conditionally sum the values with the help of this condition =Sum(If([P/N]='P' or  [P/N]='N',Val)) you exclude the value E from the calculation and draw a pie chart.I thin it is clear for you.

Hope this helps you.

Regards,

Anand

SunilChauhan
Champion
Champion

TextCount (if([P/N]) <>'E',[P/N]) )

Sunil Chauhan
Not applicable
Author

Hi, thanks for your work Anand, but though it worked in your file, I couldn't recreate it in my original one (said that Val was an error). Sunil, yours worked fine apart from there is a superflous )

It should be TextCount (if([P/N] <>'E',[P/N]) )

From another source, I've got this code too, I'm not sure how it works but it does

Count ({$<[P/N]={'P'}+{'N'}>}[P/N])