Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
divyanshi
Contributor III
Contributor III

can we use self created field in mapping in qilksense???

I mapped a field named XYZ using applymap function.

Now i need to use this field XYZ as a common field in another applymap function.

I am getting an error that field XYZ not found.

Kindly help.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Looks you need to use a preceding Load so the field ABC is created before you use it.

spm:

Load

applymap('map2',ABC,null()) as department ,

*

;

Load

ID,

Name,

applymap('map1',ID,null()) as ABC,

from file2;

View solution in original post

9 Replies
Anonymous
Not applicable

Yup - As long you create the XYZ field before using it.

divyanshi
Contributor III
Contributor III
Author

Kindly explain .

Anonymous
Not applicable

Can you post the log file of the failed reload then I can explain in the context of your load script.

divyanshi
Contributor III
Contributor III
Author

map1:

Mapping Load

ID,

XYZ

from file1;

map2:

Mapping Load

P as ABC,

department

from file3;

spm:

ID,

Name,

applymap('map1',ID,null()) as ABC,

applymap('map2',ABC,null()) as department

from file2;

getting error on underlined ABC field.

Anonymous
Not applicable

Looks you need to use a preceding Load so the field ABC is created before you use it.

spm:

Load

applymap('map2',ABC,null()) as department ,

*

;

Load

ID,

Name,

applymap('map1',ID,null()) as ABC,

from file2;

divyanshi
Contributor III
Contributor III
Author

is this load within load and in 1 table???

Anonymous
Not applicable

Have a look at this Blog Post Preceding Load by Henric and this one by https://www.quickintelligence.co.uk/preceding-load-qlikview/ by stevedark

QlikSense load scripts work the same as QlikView load scripts so the posts are valid for your scenario.

Preceding Loads are very useful and efficient.

divyanshi
Contributor III
Contributor III
Author

Thanks a lot

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks for sharing my post Bill.

I've heard (though not benchmarked) that preceding loads are less efficient in Sense than QlikView, so I avoid them in some cases now.

However... the way they help you to keep your code tidy and remove duplication makes them well worth taking a bit of a performance hit on.