Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
kmswetha
Creator
Creator

Join

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?

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Send a sample or explain better please

sunny_talwar

Providing a sample data with expected output will make it easier to understand what you are looking to do.

Best,

Sunny

kmswetha
Creator
Creator
Author

HI,

This is how the data looks like in dim and fact.

   

FactDimension
XXXYYYZZZ
160160177
161161172
162162173
163174163
164175164
ramoncova06
Partner - Specialist III
Partner - Specialist III

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

kmswetha
Creator
Creator
Author

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.

ramoncova06
Partner - Specialist III
Partner - Specialist III

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 ;

kmswetha
Creator
Creator
Author

Hi Ramon,

This is not working for else part.

i'e  applymap('xxx','zzz')

ramoncova06
Partner - Specialist III
Partner - Specialist III

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)

kmswetha
Creator
Creator
Author

Hi Ramon,

I have taken care of this initially .Logically it should work, But some thing it is not working.