Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Return only a portion of a variable

I have the following

Variable1 = North

Variable2 = North East

I need the ability to create an expression that would remove the portion of Variable1 that is in Variable2.  In the example above the expression would return "East" because "North" would be removed from Variable2 because it  is also in Variable1.

Thanks for any help!

Z

1 Solution

Accepted Solutions
jayshrinipurte
Partner - Creator
Partner - Creator

Hi Steve,

According to my understanding whatever you asked i tried solving it

plz check whether it is matching your requirement

If(SubField($(vVariable2),' ',1)=SubField($(vVariable1),1),Replace($(vVariable2),$(vVariable1),''))

Regards,

Jayshri

View solution in original post

4 Replies
antoniotiman
Master III
Master III

Hi Steve,

may be

Replace(Variable2,Variable1,'')

Regards,

Antonio

jayshrinipurte
Partner - Creator
Partner - Creator

Hi Steve,

According to my understanding whatever you asked i tried solving it

plz check whether it is matching your requirement

If(SubField($(vVariable2),' ',1)=SubField($(vVariable1),1),Replace($(vVariable2),$(vVariable1),''))

Regards,

Jayshri

zagzebski
Creator
Creator
Author

Thanks so much!

jayshrinipurte
Partner - Creator
Partner - Creator

Welcome Steve