Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field in fact say xxx and in one dimension which has two fields YYY , ZZZ.
Now the problem is xxx will either join with YYY (or) ZZZ fields but not both.
Can some one throw their thoughts on this?
Send a sample or explain better please
Providing a sample data with expected output will make it easier to understand what you are looking to do.
Best,
Sunny
HI,
This is how the data looks like in dim and fact.
Fact | Dimension | |
XXX | YYY | ZZZ |
160 | 160 | 177 |
161 | 161 | 172 |
162 | 162 | 173 |
163 | 174 | 163 |
164 | 175 | 164 |
I think I know what you mean
Mapping
xxx:
load
xxx,
xxx
your table ;
load
yyy
zzz
if(applymap('xxx','yyy','no') <> 'no',applymap('xxx','yyy'), applymap('xxx','zzz')) as xxx
your table;
after this you can do whatever you want for joining
Hi Ramon,
I cannot apply Applymap, because XXX doesn't have an other field to look and return and also XXX field is from fact.Just thinking if Fact can be used as Mapping table as it would have huge data.
you can use a fact for a map, and did you see that I just used the same field twice, though you just have to rename
Mapping
xxx:
load
xxx,
xxx as 1
your table ;
Hi Ramon,
This is not working for else part.
i'e applymap('xxx','zzz')
sorry I just noticed that my example had the wrong quotes
applymap only needs single quotes on the first name of the mapping table so it should be something like applymap('xxx',zzz)
Hi Ramon,
I have taken care of this initially .Logically it should work, But some thing it is not working.