Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need your help.
I want to implement logic at back end. for example. Field name is Gaap/Non-Gaap it has values like
Gaap/Non-Gaap
Gaapxyz
Gaap 123
.
.
up to 100 values
Non-Gaapxyz
Non-Gaap 123
.
.
Up to 150 values
xyz
123
And my requirement is i want to make these many values as 4 values
value 1: where ever 'Gaap' text is there consider as Gaap
value 2: where ever 'Non-Gaap' text is there consider as Non-Gaap
value 3: xyz
value 4: 123
Result should be
Gaap/Non-Gaap
Gaap
Non-Gaap
xyz
123
For all i know, have to use LIKE operator (WildMatch) in IF condition.
Regards,
Nihhal.
Hi
Try like this
Load *, Pick(WildMatch(Gaaps, 'xyz', '123', '*Non-Gaap*', '*Gaap*', '*'), 'xyz', '123', 'Non-Gaap', 'Gaap', Gaaps) AS NewGaaps;
Load * Inline
[
Gaaps
Non-Gaapxyz
Non-Gaap 123
Gaapxyz
Gaap 123
xyz
123
sdfs
];
Hi Nihhal,
Try like this
LOAD
*,
If(Pick(WildMatch(FieldName, '*xyz*', '*123*', '*Non-Gaap*', '*Gaap*', '*'), 'xyz', '123', 'Non-Gaap', 'Gaap', FieldName) AS NewFieldName
FROM DataSource;
Regards,
Jagan.
Hi
Try like this
Load *, Pick(WildMatch(Gaaps, 'xyz', '123', '*Non-Gaap*', '*Gaap*', '*'), 'xyz', '123', 'Non-Gaap', 'Gaap', Gaaps) AS NewGaaps;
Load * Inline
[
Gaaps
Non-Gaapxyz
Non-Gaap 123
Gaapxyz
Gaap 123
xyz
123
sdfs
];
Thanks for reply ramasamy.
It is working fine, however 'Preceding load is not require here.
Thank you.
Nihhal.
Thanks for reply Jagan.
It is not working fine, due to IF condition.
Thank you.
Nihhal.
Hi Nihal,
For understanding, used like that.
Yes by mistake I typed If in the expression, otherwise it works.
Regards,
Jagan.
Ok ramasamy.