Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Mapping Table Where

Hi

I have a main table (part 😎 that is joining to another table (part3) only where the id is IN part 8.

I switched over to mapping tables in the script, and I want to apply the field a in part 8, but it is only created in the following left join, and it is not finding the table.

I have part 8 bringing in all of my fields including 1 and 2, the left join below is because in this instance only (there are 8 parts but this only happens when we are at part 😎 we want part 3 fields to be brought in only when the id is in part 8. When there is a natural join, part 3 brings in all fields but we need the specific population.

Hope this makes sense! Thanks!

Part8:
LOAD ..... FROM

LEFT JOIN(Part8)
LOAD
[id],
[id2],
[id3],
sum([1]) as [field a]
sum([2]) as [field b]
resident [Part 3]
group by [Cedent/ Reinsurer],[Cedent Institution Name],[Cedent NAIC Company Code];

--------------------------------

[ML_Part3_Join_Funds]:
Mapping Load
[Cedent/ Reinsurer],
SUM([Part3_Join_field a]) as [field a]
Resident [Part 3]
Group by [ID];

1 Solution

Accepted Solutions
Highlighted

Re: Mapping Table Where

Hi Laila, I'm not sure if you're looking for something like this:

MappingField_a:

Mapping LOAD
[id],
sum([1]) // as [field a]
resident [Part 3]
group by [id];


MappingField_b:

Mapping LOAD
[id],
sum([2]) // as [field b]
resident [Part 3]
group by [id];


Table1:

LOAD Id

Name

Phone

YesorNo

If(YesorNo='YES', Applymap ('MappingField_a',Id,'N/A') as [Part 3_field a]

If(YesorNo='YES', Applymap ('MappingField_b',Id,'N/A') as [Part 3_field b]

From...





View solution in original post

7 Replies
Highlighted

Re: Mapping Table Where

I have no idea what you are trying to do. Do you possibly share your application?

Highlighted

Re: Mapping Table Where

please try to explain with sample data and expected result.

Highlighted
Not applicable

Re: Mapping Table Where

Table1:

Id

Name

Phone

YesorNo

Applymap ('MappingTable1',[YesorNo],'N/A') as [Table1Id], WHERE YesorNo=YES

From...

Highlighted

Re: Mapping Table Where

You need to load you mapping table first than you need to call the table later..

I guess you have not loaded the mapping table first ..so that's causing the issue.

Load you mapping table first and then check

Highlighted
Not applicable

Re: Mapping Table Where

No I loaded my mapping table, I just want to know the "Where" Syntax...Is that right? It doesn't seem to be working.

Highlighted

Re: Mapping Table Where

Hi Laila, I'm not sure if you're looking for something like this:

MappingField_a:

Mapping LOAD
[id],
sum([1]) // as [field a]
resident [Part 3]
group by [id];


MappingField_b:

Mapping LOAD
[id],
sum([2]) // as [field b]
resident [Part 3]
group by [id];


Table1:

LOAD Id

Name

Phone

YesorNo

If(YesorNo='YES', Applymap ('MappingField_a',Id,'N/A') as [Part 3_field a]

If(YesorNo='YES', Applymap ('MappingField_b',Id,'N/A') as [Part 3_field b]

From...





View solution in original post

Re: Mapping Table Where

try link this

Table1:

LOAD Id,

Name,

Phone,

YesorNo,

Applymap ('MappingTable1',[YesorNo],'N/A') as [Table1Id]

WHERE YesorNo='YES'

From...