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: 
Fatima_Augen
Contributor
Contributor

Extracting 'Treatment' to create a new column.

Hi All,

I have a column that includes 'treatment,' and I'm trying to extract the 'treatment' from that column to create a new one. I'm new to Qlik Sense and attempted to create new dimensions using this formula.

"if(Match(AdSetName, '001-*'), SubField(SubField(AdSetName, '-', 2), '-', 1), SubField(AdSetName, '-', 1))"

This is the column format

Ad Set Name
Circumcision-Hyderabad
Piles-Hyderabad-Sep23
001-Circumcision-Vizag-Urology-LG
Lipoma-Trivandrum-Sep23
Piles-Kochi-Sep23
001-Circumcision-Kochi-Urology-LG
Piles-Chennai-Sep23
001-Piles-Vizag-Procto-LG
Lipoma-Coimbatore-Sep23
Gynecomastia-Bangalore-Sep23
Gynecomastia-Bangalore-Sep23
Piles-Vizag-Sep23

If any helps that is really appreciate

Thanks,

Fatima

Labels (1)
1 Solution

Accepted Solutions
Lauri
Specialist
Specialist

I think you are close to solving this. Try this:

if(WildMatch(AdSetName, '001-*'), SubField(AdSetName, '-', 2), SubField(AdSetName, '-', 1))

View solution in original post

2 Replies
Lauri
Specialist
Specialist

I think you are close to solving this. Try this:

if(WildMatch(AdSetName, '001-*'), SubField(AdSetName, '-', 2), SubField(AdSetName, '-', 1))

Fatima_Augen
Contributor
Contributor
Author

Thank you !!! it worked.