Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two fields RegionA and RegionB. I want to introduce a new field which will have logic like.
RegionA = 'ASIA' or RegionB ='ASIA' ..I want this logic in new field lets say named RegionC. How can I write it in a generic way?
Hi,
May be like this
load *,if(RegionA=RegionA,RegionA) as Region;
LOAD * Inline
[
RegionA,RegionB
Asia,Africa
Africa,Asia
Asia,Asia
];
Regards
ASHFAQ
You can use alternate states to do this. You can find an example here: Using Alternate States to Select Multiple Values in a List Box with Different Attributes.
So in my case do I need to compare each and every value From RegionB with Region A like below?
if(FindOneOf('ASIA',RegionB) > 0, RegionA) as RegionC,
In my case its not working I think. In my case If RegionA is Asia , RegionB can contain different values and vice versa.
And i need to show Combination when RegionA = Asia OR RegionB = Asia