Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Brains Trust,
I wonder if you can please help me with my formula. The formula in a field I have created is to find the letter D in one of the other columns in the set. In the new field put the word 'Dog' and for all other letters/numbers that appear, put an 'X'.
If (WildMatch([Animals]'D*')=1, 'Dog' [,else 'X'])
Please see the table below;
D = Dog, C = Cow, H = Horse, F = Fish, B = Bird
Colour | Animal | Results (Formula above) |
Brown | D, C, H | |
Green | F, B | |
Black | D, C, H, F, B |
I have tried this formula but is still saying there is an error, can anyone shed some light on where I'm going wrong or what I could try?
Thanks in Advance!
HI @Bravo_B
Try like below
MapName:
Mapping LOAD * Inline
[
A1, A2
D, Dog
C, Cow
H, Horse
F, Fish
B, Bird
];
Temp:
LOAD *, Trim(SubField(Animal,',')) as A1 INLINE [
Colour, Animal
Brown, "D, C, H"
Green, "F, B"
Black, "D, C, H, F, B"
];
Load Colour, Concat(ApplyMap('MapName', A1, 'X'),',') as Animal Resident Temp group by Colour;
DROP Table Temp;
HI,
Do you have only 5 Vales or animals ?
D = Dog, C = Cow, H = Horse, F = Fish, B = Bird
or is there something apart from this ?
Hi there,
Yes, only 5 animals. It is part of something bigger, but I am just trying to work out the formula for this kind of scenario.
Thanks!
Hi ,
Could you please provide the result what you are expecting in other column.
Not sure i, completely understood the problem.
Thanks
hi,
your formula will be like this
If (WildMatch([Animals],'D*'), 'Dog' ,'XX');
ksrinivasan
hi,
If (WildMatch([Animal],'D*'), 'Dog' ,'XX');