Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nagasekhar
Contributor III
Contributor III

look up maping

 

WHY  I AM GETTING BLANK VALUES HERE?

SCRIPT:

Directory;
T2:
LOAD StudentID,
[m marks]
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is [M marks]);
T1:
LOAD StudentID,
[sc marks]
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is [sc marks]);

Directory;
Student:
LOAD StudentID,
name,
Lookup('[sc marks]','StudentID',StudentID,'T1') as scmarks,
Lookup('[m marks]','StudentID',StudentID,'T2') as mamarks
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is Sheet3);

look.png

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

JUST Remove the square brackets , thats the only problem here nothing wrong with any association

remove these brackets in red, these are not needed

Lookup('[sc marks]','StudentID',StudentID,'T1') as scmarks
 Lookup('[m marks]','StudentID',StudentID,'T2') as mamarks

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

11 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Looks everything fine. Nothing wrong with the code. Working at my side.


T2:
LOAD * Inline [
StudentID,"m marks"
101,34
102,54
103,65
104,35
105,34
106,35
];

T1:
LOAD * Inline [
StudentID,"sc marks"
101,65
102,556
103,656
104,35576
105,3456
106,3545
];

Student:
Load *,
Lookup('sc marks','StudentID',StudentID,'T1') as scmarks,
Lookup('m marks','StudentID',StudentID,'T2') as mmarks;

LOAD * Inline [
StudentID,name
101,A
102,B
103,C
104,D
105,E
106,F
];

AshutoshBhumkar_0-1636867275487.png

Try loading tables one by one and check the output of each table or try using Applymap().

 

Thanks,
Ashutosh

nagasekhar
Contributor III
Contributor III
Author

if i am commenting lookup then i am getting values for each table

but if i apply lookup i am getting blank values

 

LOAD StudentID,
[m marks]
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is [M marks]);
T1:
LOAD StudentID,
[sc marks]
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is [sc marks]);

Directory;
Student:
LOAD StudentID,
name
//Lookup('[sc marks]','StudentID',StudentID,'T1') as scmarks
// Lookup('[m marks]','StudentID',StudentID,'T2') as mamarks
FROM
[C:\Users\User\Downloads\New folder (5)\qlik files\lookup.xlsx]
(ooxml, embedded labels, table is Sheet3);

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

That's because of association of the tables on StudentID.

vinieme12
Champion III
Champion III

JUST Remove the square brackets , thats the only problem here nothing wrong with any association

remove these brackets in red, these are not needed

Lookup('[sc marks]','StudentID',StudentID,'T1') as scmarks
 Lookup('[m marks]','StudentID',StudentID,'T2') as mamarks

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

Also Try to never use lookup,

either Join the Data of User Applymap()

lookup is very slow compared to Applymap()

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nagasekhar
Contributor III
Contributor III
Author

with inline load i am getting but i am not getting with loading from excel

 

vinieme12
Champion III
Champion III

post your script, 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nagasekhar
Contributor III
Contributor III
Author

what is the problem with brackets?

can you explain something?

vinieme12
Champion III
Champion III

refer this

https://community.qlik.com/t5/Qlik-Design-Blog/QlikView-Quoteology/ba-p/1476029

 

when you load the field [sc marks] it will be stored as  sc marks, w/o brackets

but in the lookup() because you had quoted [sc marks], it was basically searching for a field that does not exists

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.