Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have the following values in my data.
TEXT:
A01// External Sales Data
A13// TV Campaign
No Activity
Here, i would like to check if the values in TEXT have // and then extract the first 3 values.
From the above mentioned data i would like to only display A01 and A13.
TIA
Sai.
Hi,
It works with :
TEXT:
load if (wildmatch(Field,'*//*'), SubField(Field,'//',1),'') as Field2
inline [
Field
A01// External Sales Data
A13// TV Campaign
No Activity];
I would prefer using Index and Left functions. Take a look:
LOAD * ,If(Index(text, '//'), Left(text, 3), null()) as Result INLINE [ text A01// External Sales Data A13// TV Campaign No Activity ];
This is your expected results:
Also, I do advise you instead of Null() in If statement to you something that's easy to count and find.
If(Index(text, '//'), Left(text, 3), ':') as Result
Thanks all for you valubale suggestions.
For the same data i have found out that there is another Text field, now i have to check both the fields and then extract the Value if exists in either one of them.
Please, check the attached excel.
In the first Column Text2 is Empty, Second one has Text Empty, Third one has both the Values same and the Fourth one has no Values.
TIA!!