Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ramprakashs
Contributor II
Contributor II

Match

Hi When applying the following query i should get the count of projects but I am getting '-'

IF(MATCH(CONTRACTSTAGE, '30 / Pre-Tender'), Count(distinct PROJECTID))

Please correct me my mistake.

Thanks in advance.

Labels (1)
2 Solutions

Accepted Solutions
sunny_talwar

Try this

Count(DISTINCT {<CONTRACTSTAGE = {'30 / Pre-Tender'}>} PROJECTID))

 

View solution in original post

sunny_talwar

Like this

Count(DISTINCT {<CONTRACTSTAGE = {'30 / Pre-Tender'}, Condition2Field = {'abc'}, Condition3Field = {'xyz'}>} PROJECTID))

View solution in original post

12 Replies
sunny_talwar

Try this

Count(DISTINCT {<CONTRACTSTAGE = {'30 / Pre-Tender'}>} PROJECTID))

 

ramprakashs
Contributor II
Contributor II
Author

Thanks it worked

ramprakashs
Contributor II
Contributor II
Author

Also how to add additional condition along with it?

sunny_talwar

Like this

Count(DISTINCT {<CONTRACTSTAGE = {'30 / Pre-Tender'}, Condition2Field = {'abc'}, Condition3Field = {'xyz'}>} PROJECTID))
ramprakashs
Contributor II
Contributor II
Author

ValueNew Bidder TotalTotal Projects with BiddersPre-TenderApplications to Tender
Small4400
<£1m10920
£1m-£10m282300
£10m-£50m5410
£50m-£200m0000
Mega2100

 

I need my output like this, while I tried

IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'A', Value, 'Small'),COUNT(Distinct PROJECTID)
,(IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'B', Value, '<£1m'),COUNT(Distinct PROJECTID)
,(IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'C', Value, '£1m-£10m'),COUNT(Distinct PROJECTID)
,(IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'D', Value, '£10m-£50m'),COUNT(Distinct PROJECTID)
,(IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'E', Value, '£50m-£200m'),COUNT(Distinct PROJECTID)
,(IF(MATCH(CONTRACTSTAGE,'32 / Tender Currently Invited', sub_val, 'F', Value, 'Mega'),COUNT(Distinct PROJECTID))))))))))))

I am getting '-' in the output, What did I missed?

 

sunny_talwar

I am not sure, would you be able to share a qvw or qvf file to show what you have to help you better?

ramprakashs
Contributor II
Contributor II
Author

 
sunny_talwar

Which chart in the sample is having issues and what is that you are looking to get in that chart based on the data shared?

ramprakashs
Contributor II
Contributor II
Author

The second one i need it based on contractstage, sub_val and value.

i.e: for Contract Stage = '30 / Pre-Tender' sub_val = 'A' and value='Small'

This should be done for 6 Values and 12 Contract Stages.