Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

If expression KPI QlikSense

I try the following expression:

if([Contract Type]='Valid',Count([Contract Type]))

and it give me null value!!

any help please

3 Replies
Highlighted
Master II
Master II

Re: If expression KPI QlikSense

Try count({<[contract type]={'Valid'} >} contractid) no if statement required.

Assuming you are wanting the number of valid contracts.

Regards

Andy

Highlighted
Specialist
Specialist

Re: If expression KPI QlikSense

Set analysis is recommended for performance reasons and there is at least one case where IF would give you wrong result. Point 2b in the link below:

Using “IF” in expressions vs using “Set Analysis” | QlikView Help, Tips & Hints

Highlighted
Partner
Partner

Re: If expression KPI QlikSense

although the other answers are right that a set Analysis for performance reasons are the better solution:

count(if([contract type]='Valid',[contrace type])

works.

Regards