Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Display data along with keyword count

I have the below data (Table 1) in EXCEL

The identifier column indicate whether row is country or city.The Data columns indicates the data and comments indicates the Comments

   

IdentifierDataComments
CountryJapancomments Japan
CityTokyocomments
CountrySpaincomment
CityMadridCity Madrid
CountryFranceFrance country Paris City
CityParisCity Paris

I want to display data in below format

Where the based on identifier the data column is displayed in Country,City and comments column.

If the country name found in Comments then 1 is displayed in Country count column.

If the city name found in Comments then 1 is displayed in City count column.

      

CountryCityComments_CountryComments CityCountry CountCity count
JapanTokyocomments Japancomments Tokyo comments10
SpainMadridcommentCity Madrid01
FranceParisFrance country Paris CityCity Paris11
Total22

Please Suggest

10 Replies
antoniotiman
Master III
Master III

Expressions :

Sum(If(Comments_Country Like '*'&Country&'*',1))

Sum(If(Comments_City Like '*'&City&'*',1))