Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bsnoles
Contributor
Contributor

CountIF Field equals a text variable

I have a table with multiple fields and I need to count the number of records with the text variable of 'Update Record' based upon another field but I only want to count the 'Update Record' once based upon the second field.  For example:

1st field name is Record Reporting Category is equal to 'Update Record' then count but only count it one time based upon the 2nd field name of Record UID.

Any help would be appreciated.

Labels (2)
11 Replies
MendyS
Partner - Creator III
Partner - Creator III

hi @bsnoles 

you need to Used with set analysis and distinct , 
something like  - 
Count ({<Reporting Category={'Reporting Category'}>}Distinct Record UID)

bsnoles
Contributor
Contributor
Author

That did not work for me....let me try to explain further.  I have 60,583 distinct UID records of which some of them have the word 'Update Record' in a field called Reporting Category.  I need to extrapolate and count those records with 'Update Record' in the Reporting Category field.

 

BrunPierre
Partner - Master
Partner - Master

Count ({<Reporting Category={"*Update Record*"}>}Distinct UID)

MendyS
Partner - Creator III
Partner - Creator III

@bsnoles  can you send a screenshot with a sample from your data?  

bsnoles
Contributor
Contributor
Author

Peter - sorry but it is giving me a count of zero but I do have records with 'Update Record' in that Reporting Category field.

bsnoles
Contributor
Contributor
Author

Here is a snap of my two columns....I only need to count the UID once every time 'Update Record' is present.

BrunPierre
Partner - Master
Partner - Master

As @MendyS mentioned It would be useful to see a sample of the data.

MendyS
Partner - Creator III
Partner - Creator III

@bsnoles 

 

Count ({<CCarR Record Reporting Category={"*Update Record*"}>}Distinct CCarR Record UID)

 
bsnoles
Contributor
Contributor
Author

Mendy - how do I do the formula above it the CCaR Record Reporting Category is Null and still be a distinct UID?