Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i made a new feild in the script for the dimensions.
how i need to write it in the script ?
i want that the field target=14 and destinetion=14 will be one dimension.
if(Match([target],'A',{<[denstinetion]{'14'}>}),'others',
thanks'
yarin.
So you have two fields in one source table and you want to create a third field to somekind of flag your content?
Looking at your expression, I am not sure what you want to achieve with this.
,{<[denstinetion]{'14'}>} looks similar to a set expression, but you can't use set analysis in the script.
Your if(match()) statement is not complete, at least a closing bracket is missing.
Maybe you are looking for something like this:
LOAD *,
if( target = 14 and destinetion = 14, 'A','others') as NewDimension
INLINE [
target, destinetion
14, 10
10, 14
14, 14
];
Only the third record ( both fields are 14) will ne flagged with 'A', first and second with 'others'.
Hope this helps,
Stefan
hi,
this is my script...
the last feild is o.k.
the first 2 feild is not o.k. (in the tables 1 coulm with no headline.
what is my problem ?
if(Match([מטרת אריזה],'A' and target=3),'קבמים אחרים',
if(Match([מטרת אריזה],'A' and target=14),'ברקן',
if(Match([מטרת אריזה],'B'),'שוק מקומי',
if(match([מטרת אריזה],'D'),'חו"ל',
if(match([מטרת אריזה],'C'),'מלאי'))))) as [יעוד אריזה חדש]
,
Not sure what you mean with "(in the tables 1 coulm with no headline."
Do you mean 1 column in your source table or after your load?
If I read your expression correctly, this will create 1 field [יעוד אריזה חדש] from two others,
[מטרת אריזה] and target.
You probably need to finish your match function before applying your and operator:
if(Match([מטרת אריזה],'A') and target=3,'קבמים אחרים',
if(Match([מטרת אריזה],'A') and target=14,'ברקן',
if(Match([מטרת אריזה],'B'),'שוק מקומי',
if(match([מטרת אריזה],'D'),'חו"ל',
if(match([מטרת אריזה],'C'),'מלאי'))))) as [יעוד אריזה חדש]
Note that I moved the finishing brackets before the and operator.
Hope this helps,
Stefan