Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ebahadur
Contributor II
Contributor II

Count of text string in Text Box

Dear All,

In my Data I have one column where the Nationalities of my staff are mentioned.

I need to count these all nationalities in a text box.

Currently I am using this : ='Total Nationalities '& '-'& TextCount([Nationality])

But I am getting Total count of all the records using this expression.

Thank you so much.

4 Replies
vishsaggi
Champion III
Champion III

Can you share some sample dataset and your expected output? Do you have any alpha-numeric values in this field? May be try like SUM(IF(ISTEXT(Nationality), 1,0))
ebahadur
Contributor II
Contributor II
Author

Dear Vishsaggi,

No, the data has only text values.

Below screenshot is for your reference.

Thank you for your help.

nationality.JPG

Vegar
MVP
MVP

Try the expression below
='Total Nationalities '& '-'& TextCount(DISTINCT [Nationality])
ebahadur
Contributor II
Contributor II
Author

Thank you very much Vegar. It worked perfectly.