Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I've got two tables like these:
Table A
VALUES DESCRIPTIONS
value1 descriptionA;
value2 descriptionB;
value3 descriptionC;
Table B
VALUES DESCRIPTIONS
value1 descriptionD;
value3 descriptionE;
I would like to have the description contained in Table B if there's the code in it and if not I'd like to have the description contained in Table A. To do that I used this statement:
If(IsNull(TABLE B.DESCRIPTIONS),TABLE A.DESCRIPTIONS, TABLE B.DESCRIPTIONS)
If I use that statement in a tree map chart I get what I want, but if I use it in a filter (in order to filter my fields by the description) I only get a blank list.
What should I do?
Thanks a lot in advance !!!
Hi
Don't use conditional expression in filter that will not be perfect in sometimes
May be you can load the table b as Mapping load and use Apply map for this.
May be the script will looks like this
TableB:
Load * from TableB.qvd(qvd);
TableBMapping:
Mapping Load TableB.Values, TableB.Descriptions Resident TableB;
TableA:
Load *, ApplyMap('TableBMapping', TableA.VALUES, TableA.DESCRIPTIONS) as TableA.DescriptionsModified
Resident TableA.qvd(qvd);
Regards
Celambarasan
Hi
Don't use conditional expression in filter that will not be perfect in sometimes
May be you can load the table b as Mapping load and use Apply map for this.
May be the script will looks like this
TableB:
Load * from TableB.qvd(qvd);
TableBMapping:
Mapping Load TableB.Values, TableB.Descriptions Resident TableB;
TableA:
Load *, ApplyMap('TableBMapping', TableA.VALUES, TableA.DESCRIPTIONS) as TableA.DescriptionsModified
Resident TableA.qvd(qvd);
Regards
Celambarasan
Thanks a lot for your help! It works perfectly!!