Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone!
I was wondering is the any function to find similar words in dimension?
what I actually mean:
1. Type (dimension) 2. Category (dimension) 3. Gross (measure)
elf _event main_elf 100$
elf_event main_orc (don't need) 50$
elf_event main_tank (don't need) 10$
As you see I need only that category where matches "elf", and don't need any other
I can just write condiion like : if(category like '*elf*', category) etc.
But the main idea that after time type changes and it can be like ORC:
1. Type (dimension) 2. Category (dimension) 3. Gross (measure)
orc_event main_elf (don't need) 100$
orc_event main_orc 50$
orc_event main_tank (don't need) 10$
And here i don't need category elf or tank.
What I would like that the function what find same words like :
if word after first symbol '_' from type in category, choose this type
Result that I am expecting :
1. Type (dimension) 2. Category (dimension) 3. Gross (measure)
orc_event main_orc 50$
OR if at this time another event
1. Type (dimension) 2. Category (dimension) 3. Gross (measure)
elf_event main_elf 100$
You may add a flag to your load or filter the loads with it directly, like:
-(subfield(Type, '_', 1)=subfield(Category, '_', 2)) as Flag
- Marcus
@marcus_sommer Thank you for your answer! But could I search not the specific position in category field '2'? I mean actually I don't know where key word will be placed in category : main_elf(2) or elf_main(1) or new_main_elf(3). There is only key word elf and doen't matter where it is. Something like:
if(subfield(type, '_', 1)=subfield(Category, '_'), type)
Hi @Protoss ,
You can use the like operator for this comparison:
Category like '*$(=subfield(type, '_', 1))*'
or even others:
WildMatch(Category, '*' & subfield(Type, '_', 1) & '*') = 1
Index(Category, subfield(Type, '_', 1)) > 0
JG
@JuanGerardo Hi Juan!
Thanks a lot! It is really useful!