

{"id":51087,"date":"2019-03-05T10:05:40","date_gmt":"2019-03-05T04:35:40","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=51087"},"modified":"2021-12-07T11:17:49","modified_gmt":"2021-12-07T05:47:49","slug":"qlikview-mapping","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/","title":{"rendered":"QlikView Mapping &#8211; ApplyMap Function &amp; Mapping Load Statement"},"content":{"rendered":"<p>In this lesson, we will learn about QlikView mapping and how it is used <strong>QlikView scripting<\/strong>. Along with this, we will learn QlikView ApplyMap function and mapping load with syntax and example. So, let\u2019s start with learning the mapping process in QlikView to create mapping tables.<\/p>\n<h3>What is QlikView Mapping?<\/h3>\n<p>In simplest of words, QlikView Mapping is temporarily making a table (mapping table) using data or field values from pre-existing tables from different models and sources.<\/p>\n<p>The mapping tables are stored in QlikView\u2019s memory only till the time the script is executed and after that, it is automatically removed.<\/p>\n<p>Mapping creates a table with assorted data fields and values whose content can be accessed in different ways through statements or functions (MapSubstring(), ApplyMap(), Rename Field, Map\u2026Using etc.). Using mapping, you can replace field names or values during script execution.<\/p>\n<h3>QlikView Mapping Load Statement<\/h3>\n<p>The Mapping Load statement is used to load fields and values into a freshly created mapping <strong>table in QlikView<\/strong>.<\/p>\n<p><strong>Syntax<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Mapping(loadstatement | selectstatement)<\/pre>\n<p>The word <strong>Mapping<\/strong> is used as a prefix to LOAD or SELECT statements commanding the system to save the loaded fields in the mapping table.<\/p>\n<p>Typically, a mapping table has two columns, first containing values for comparison (as a reference point) and second containing the resultant or desired values based on the comparison. For instance, you can have country codes as the reference column and country names as the second resultant column.<\/p>\n<p>Upon script execution, the country codes will be replaced by the corresponding country names.<\/p>\n<p><strong>Example of mapping load in QlikView.<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\/\/ Load mapping table of country codes:\r\nMapCountry:\r\nmapping LOAD * \r\nInline [\r\nCountryCode, Country\r\nSw, Sweden\r\nInd, India\r\nChn, China\r\nIty, Italy,\r\nCnd, Canada\r\nDk, Denmark\r\nNo, Norway\r\n];<\/pre>\n<p>Thus, this will load a mapping table named MapCountry having two columns, namely, CountryCode and Country. The contents of these mapping tables can be used further by mapping statements and functions like ApplyMap.<\/p>\n<h3>QlikView ApplyMap Function<\/h3>\n<p>The QlikView ApplyMap() function fetches content from an existing mapping table. It maps the result of an expression to an existing field from the mapping table.<\/p>\n<p><strong>Syntax<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">ApplyMap('map_name', expression [ , default_mapping ] )<\/pre>\n<p>Where map_name is the name of the pre-existing mapping table.<\/p>\n<p>The expression is the expression or field whose result should be mapped to a mapping table field.<\/p>\n<p>default_mapping is the value, if mentioned will be returned if there is no match of the field values from the existing mapping table. If not mentioned, the value is returned as it is in the resultant table.<\/p>\n<p><strong>Example of Qlikview ApplyMap Function<\/strong><\/p>\n<p>Let us get a better understanding of this by the help of an example. Here, we will continue the same country code example as we used in the mapping load section.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\/\/ Load list of store managers, mapping country code to country\r\nStoreManagers:\r\nLOAD *, \r\nApplyMap('MapCountry', CountryCode,'Others') As Country\r\nInline [\r\nCountryCode, StoreManager\r\nSw, John Dalton\r\nCnd, Mary Robins\r\nIty, Andrea Russo \r\nArg, Harry Gibson \r\nDk, William Gilbert\r\nInd, Indrani Sen\r\nNo, Daniel Larsen\r\nRom, Emilia Mark];\r\n\/\/ We don't need the CountryCode anymore\r\nDrop Field 'CountryCode';\r\n<\/pre>\n<p>Now, the resultant table will look as given below.<\/p>\n<table dir=\"ltr\">\n<colgroup>\n<col width=\"134\" \/>\n<col width=\"100\" \/><\/colgroup>\n<tbody>\n<tr>\n<td><strong>\u00a0 \u00a0Store Manager<\/strong><\/td>\n<td><strong>\u00a0 \u00a0 Country<\/strong><\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0John Dalton<\/td>\n<td>\u00a0 \u00a0 \u00a0Sweden<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Mary Robins<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Canada<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Andrea Russo<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Italy<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Harry Gibson<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Others<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0William Gilbert<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Denmark<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Indrani Sen<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0India<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Daniel Larsen<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Norway<\/td>\n<\/tr>\n<tr>\n<td>\u00a0 \u00a0 \u00a0Emilia Mark<\/td>\n<td>\u00a0\u00a0 \u00a0 \u00a0Others<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As you can see in the table, the name of the country corresponding to the country code written beside the store manager name is mapped into the final table using an applymap function.<\/p>\n<p>Also, those countries (like Arg and Rom) for which there were no reference country names in the table \u201cMapCountry\u201d are written as \u201cOthers\u201d.<\/p>\n<h3>Features of QlikView Mapping<\/h3>\n<p>Some important <strong>features of QlikView<\/strong> mapping are:<\/p>\n<ul>\n<li>It is similar to the lookup function where a field value is used as a reference to another field existing in the mapping table and returns a matching result.<\/li>\n<li>In QlikView <strong>mapping<\/strong>, always a mapping table is created by Mapping Load or Mapping Select before applying a Map function.<\/li>\n<li>A mapping table resides temporarily in the memory of QlikView until the time script execution is completed. It is dropped out once a script is executed.<\/li>\n<li>The temporary mapping table does not affect the main data tables stored in-memory of QlikView.<\/li>\n<li>Any mapping table can be recalled and reused in a script as many times as a user require.<\/li>\n<li>In a mapping table, the first field is called as a key and the second field or column is referred to as mapped value ALWAYS.<\/li>\n<li>All the mapping requirements can do in a single script.<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>Thus, this was all about QlikView mapping with QlikView ApplyMap() and mapping load. We learned about what is mapping, how to create mapping tables using the Mapping Load or Mapping Select statements and finally how to use mapping through the ApplyMap() function.<\/p>\n<p>We hope our explanation was helpful. Feel free to share your thoughts with us!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, we will learn about QlikView mapping and how it is used QlikView scripting. Along with this, we will learn QlikView ApplyMap function and mapping load with syntax and example. So, let\u2019s&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":51094,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[19106,19107,19108,19104,19105],"class_list":["post-51087","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlikview","tag-mapping-in-qlikview","tag-qlikview-applymap-function","tag-qlikview-mapping-load","tag-qlikview-mapping-tutorial","tag-what-is-qlikview-mapping"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>QlikView Mapping - ApplyMap Function &amp; Mapping Load Statement - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn QlikView Mapping Function with Mapping Load Statement and ApplyMap Function with syntax and example along with mapping features\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QlikView Mapping - ApplyMap Function &amp; Mapping Load Statement - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn QlikView Mapping Function with Mapping Load Statement and ApplyMap Function with syntax and example along with mapping features\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-05T04:35:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-07T05:47:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1201\" \/>\n\t<meta property=\"og:image:height\" content=\"629\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"QlikView Mapping - ApplyMap Function &amp; Mapping Load Statement - DataFlair","description":"Learn QlikView Mapping Function with Mapping Load Statement and ApplyMap Function with syntax and example along with mapping features","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/","og_locale":"en_US","og_type":"article","og_title":"QlikView Mapping - ApplyMap Function &amp; Mapping Load Statement - DataFlair","og_description":"Learn QlikView Mapping Function with Mapping Load Statement and ApplyMap Function with syntax and example along with mapping features","og_url":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-03-05T04:35:40+00:00","article_modified_time":"2021-12-07T05:47:49+00:00","og_image":[{"width":1201,"height":629,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"QlikView Mapping &#8211; ApplyMap Function &amp; Mapping Load Statement","datePublished":"2019-03-05T04:35:40+00:00","dateModified":"2021-12-07T05:47:49+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/"},"wordCount":735,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg","keywords":["Mapping in QlikView","QlikView ApplyMap Function","Qlikview Mapping Load","QlikView Mapping tutorial","What is QlikView Mapping"],"articleSection":["QlikView Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/","url":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/","name":"QlikView Mapping - ApplyMap Function &amp; Mapping Load Statement - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg","datePublished":"2019-03-05T04:35:40+00:00","dateModified":"2021-12-07T05:47:49+00:00","description":"Learn QlikView Mapping Function with Mapping Load Statement and ApplyMap Function with syntax and example along with mapping features","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/qlikview-mapping\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/03\/QlikView-mapping.jpg","width":1201,"height":629,"caption":"QlikView mapping Load and ApplyMap"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/qlikview-mapping\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"QlikView Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/qlikview\/"},{"@type":"ListItem","position":3,"name":"QlikView Mapping &#8211; ApplyMap Function &amp; Mapping Load Statement"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/51087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=51087"}],"version-history":[{"count":10,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/51087\/revisions"}],"predecessor-version":[{"id":104872,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/51087\/revisions\/104872"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/51094"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=51087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=51087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=51087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}