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: 
Hareeshkommineni
Contributor III
Contributor III

Apply Map Function

Maptab: Mapping LOAD * INLINE [

ID, NAME

  1, A

2,

3, C

4, D

5,

6, E  ];

This is my mapping table

using apply map i want replace null value  with some names and NAME Field get into the main table

MainTable:
LOAD [Customer ID],
Details,
Product,

ApplyMap('Maptab',[Customer ID],'notnull') as Name
FROM
C:\Users\new\Documents\Applymap.xlsx
(ooxml, embedded labels, table is Sheet1);

this is my main table

please help me

thanks & regards

hareesh

5 Replies
Vegar
MVP
MVP

 Maptab:
 Mapping LOAD 
 	ID, 
 	IF(len(NAME)=0,null(),NAME) 
 INLINE [
    ID, NAME
    1, A
    2, 
    3, C
    4, D
    5, 
    6, E
    7, F
    8, G
    9, H
];

Applymap:
LOAD [Customer ID], 
     Details, 
     Product,
     
     ApplyMap('Maptab',[Customer ID],'notnull')  as Name
FROM
Applymap.xlsx
(ooxml, embedded labels, table is Sheet1);

I added an Nullvalue in your xlsx-file 

Hareeshkommineni
Contributor III
Contributor III
Author

but in Name fields It display blanks only

WhatsApp Image 2019-03-26 at 3.46.05 PM.jpeg

balnks are not filled

Vegar
MVP
MVP

I might have misunderstod you. In my example it returns null for the empty names, but if you want another value just change Null() to 'notnull'

Maptab:
 Mapping LOAD 
 	ID, 
 	IF(len(NAME)=0,'NotNull',NAME) 
 INLINE [
    ID, NAME
    1, A
    2, 
    3, C
    4, D
    5, 
    6, E
    7, F
    8, G
    9, H
];

Another approach could be exclued the empty rows in your map table

 Maptab:
 Mapping LOAD * INLINE [
    ID, NAME
    1, A
    2, 
    3, C
    4, D
    5, 
    6, E
    7, F
    8, G
    9, H
]
WHERE
   Len(NAME) > 0
;
Vegar
MVP
MVP

Hareeshkommineni
Contributor III
Contributor III
Author

yeah its working thank you for your help