<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Mapping multiple data columns to the same field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189024#M1281174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following sample data (can't find how to attach my sample QVW file?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Data:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;contact_id,purchase type,count2005,value2005,count2006,value2006,count2007,value2007,count2008,value2008,count2009,value2009,count2010,value2010,loyalty2005,loyalty2006,loyalty2007,loyalty2008,loyalty2009,loyalty2010,purchases2005,purchases2006,purchases2007,purchases2008,purchases2009,purchases2010&lt;BR /&gt;1,Lights,1,30.769,0,0,0,0,7,175,1,25,1,62.5,2yrs consecutive,Lapsed Buyer,Lapsed Buyer,Reactivated Buyer,2yrs consecutive,3yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Bike Frame,0,0,0,0,0,0,0,0,0,0,0,0,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Saddle,10,250,12,300,12,300,5,125,9,225,12,300,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Brake Pads,0,0,1,7,1,25,0,0,0,0,0,0,Non Buyer,New Buyer,2yrs consecutive,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,All Purchases,11,280.769,13,307,13,325,12,300,10,250,13,362.5,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;2,Saddle,0,0,0,0,0,0,1,5,1,5,1,5,Non Buyer,Non Buyer,Non Buyer,New Buyer,2yrs consecutive,3yrs consecutive,,,,Saddle,Saddle,Saddle)&lt;BR /&gt;2,All Purchases,0,0,0,0,0,0,1,5,1,5,1,5,Non Buyer,Non Buyer,Non Buyer,New Buyer,2yrs consecutive,3yrs consecutive,,,,Saddle,Saddle,Saddle)&lt;BR /&gt;3,Lights,1,5,1,2,1,5,1,2,1,3,0,0,Reactivated Buyer,2yrs consecutive,3yrs consecutive,4yrs consecutive,5+yrs consecutive,Lapsed Buyer,Lights,Lights,Lights,Lights,Lights,)&lt;BR /&gt;3,All Purchases,1,5,1,2,1,5,1,2,1,3,0,0,Reactivated Buyer,2yrs consecutive,3yrs consecutive,4yrs consecutive,5+yrs consecutive,Lapsed Buyer,Lights,Lights,Lights,Lights,Lights,)&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Years:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;Year&lt;BR /&gt;2005&lt;BR /&gt;2006&lt;BR /&gt;2007&lt;BR /&gt;2008&lt;BR /&gt;2009&lt;BR /&gt;2010&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And what I am hoping to be able to do is to link / map related year fields to their respective year. To give a bit mroe detail I am wanting to be able to have 2 list boxes, one for year and one for purchase_type and then to have charts showing data relating to those years.&lt;/P&gt;&lt;P&gt;The issue I am struggling with is to find a way of mapping columns count2005,value2005,loyalty2005,purchases2005 to the year 2005 so that when I select the year filter = '2005' only those columns are used in charts. I have added a variable for the years but am not sure how to map 2005 onto all 4 related fields without creating 4 separate calendars (which seems like overkill to me!).&lt;/P&gt;&lt;P&gt;I am ideally hoping to be able to create a chart where I can have purchase type and year as listbox filters, and then show a stacked total of loyalty or purchases, with the expressions being either distinct count of contact_id / total value for reference year / total count of purchases for reference year - with the charts looking something along these lines - &lt;A href="http://img847.imageshack.us/i/samplechart.jpg/" title="Sample Charts" target="_blank"&gt;chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Massive thanks in advance!&lt;/P&gt;&lt;P&gt;Davin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2026-01-26T18:19:17Z</dc:date>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189024#M1281174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following sample data (can't find how to attach my sample QVW file?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Data:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;contact_id,purchase type,count2005,value2005,count2006,value2006,count2007,value2007,count2008,value2008,count2009,value2009,count2010,value2010,loyalty2005,loyalty2006,loyalty2007,loyalty2008,loyalty2009,loyalty2010,purchases2005,purchases2006,purchases2007,purchases2008,purchases2009,purchases2010&lt;BR /&gt;1,Lights,1,30.769,0,0,0,0,7,175,1,25,1,62.5,2yrs consecutive,Lapsed Buyer,Lapsed Buyer,Reactivated Buyer,2yrs consecutive,3yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Bike Frame,0,0,0,0,0,0,0,0,0,0,0,0,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Saddle,10,250,12,300,12,300,5,125,9,225,12,300,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,Brake Pads,0,0,1,7,1,25,0,0,0,0,0,0,Non Buyer,New Buyer,2yrs consecutive,Lapsed Buyer,Lapsed Buyer,Lapsed Buyer,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;1,All Purchases,11,280.769,13,307,13,325,12,300,10,250,13,362.5,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,5+yrs consecutive,Lights | Saddle,Saddle | Brake Pads,Saddle | Brake Pads,Lights | Saddle,Lights | Saddle,Lights | Saddle)&lt;BR /&gt;2,Saddle,0,0,0,0,0,0,1,5,1,5,1,5,Non Buyer,Non Buyer,Non Buyer,New Buyer,2yrs consecutive,3yrs consecutive,,,,Saddle,Saddle,Saddle)&lt;BR /&gt;2,All Purchases,0,0,0,0,0,0,1,5,1,5,1,5,Non Buyer,Non Buyer,Non Buyer,New Buyer,2yrs consecutive,3yrs consecutive,,,,Saddle,Saddle,Saddle)&lt;BR /&gt;3,Lights,1,5,1,2,1,5,1,2,1,3,0,0,Reactivated Buyer,2yrs consecutive,3yrs consecutive,4yrs consecutive,5+yrs consecutive,Lapsed Buyer,Lights,Lights,Lights,Lights,Lights,)&lt;BR /&gt;3,All Purchases,1,5,1,2,1,5,1,2,1,3,0,0,Reactivated Buyer,2yrs consecutive,3yrs consecutive,4yrs consecutive,5+yrs consecutive,Lapsed Buyer,Lights,Lights,Lights,Lights,Lights,)&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Years:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;Year&lt;BR /&gt;2005&lt;BR /&gt;2006&lt;BR /&gt;2007&lt;BR /&gt;2008&lt;BR /&gt;2009&lt;BR /&gt;2010&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And what I am hoping to be able to do is to link / map related year fields to their respective year. To give a bit mroe detail I am wanting to be able to have 2 list boxes, one for year and one for purchase_type and then to have charts showing data relating to those years.&lt;/P&gt;&lt;P&gt;The issue I am struggling with is to find a way of mapping columns count2005,value2005,loyalty2005,purchases2005 to the year 2005 so that when I select the year filter = '2005' only those columns are used in charts. I have added a variable for the years but am not sure how to map 2005 onto all 4 related fields without creating 4 separate calendars (which seems like overkill to me!).&lt;/P&gt;&lt;P&gt;I am ideally hoping to be able to create a chart where I can have purchase type and year as listbox filters, and then show a stacked total of loyalty or purchases, with the expressions being either distinct count of contact_id / total value for reference year / total count of purchases for reference year - with the charts looking something along these lines - &lt;A href="http://img847.imageshack.us/i/samplechart.jpg/" title="Sample Charts" target="_blank"&gt;chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Massive thanks in advance!&lt;/P&gt;&lt;P&gt;Davin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189024#M1281174</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189025#M1281177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;add the follwoingcode after your two load commands.&lt;/P&gt;&lt;P&gt;this wil create a data model giving you the drop down selects you require. Afterwards I am not quite sure of what your charts are trying to achieve but this should get you closer.&lt;/P&gt;&lt;P&gt;tmpTable:&lt;BR /&gt;load&lt;BR /&gt; contact_id,&lt;BR /&gt; [purchase type]&lt;BR /&gt;resident Data;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for each i in 2005, 2006, 2007, 2008, 2009, 2010&lt;/P&gt;&lt;P&gt;tmpTable:&lt;BR /&gt; concatenate (tmpTable) load&lt;BR /&gt; contact_id,&lt;BR /&gt; [purchase type],&lt;BR /&gt; $(i) as Year,&lt;BR /&gt; count$(i) as fctCount,&lt;BR /&gt; value$(i) as fctValue,&lt;BR /&gt; loyalty$(i) as loyalty,&lt;BR /&gt; replace(purchases$(i),')','') as Purchases&lt;BR /&gt; resident Data;&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;P&gt;drop table Data;&lt;/P&gt;&lt;P&gt;FinalData:&lt;BR /&gt;noconcatenate load&lt;BR /&gt;*&lt;BR /&gt;resident tmpTable&lt;BR /&gt;where len(Year)&amp;gt;1;&lt;/P&gt;&lt;P&gt;drop table tmpTable;&lt;/P&gt;&lt;P&gt;let us know how you get on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189025#M1281177</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-04-21T12:08:12Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189026#M1281179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PatAgen,&lt;/P&gt;&lt;P&gt;Thanks for posting - unfortunately I get the following errors when I try your script:&lt;/P&gt;&lt;P&gt;Table not found tmpTable&lt;/P&gt;&lt;P&gt;And then when it tries to do the concatenation none of the tables 2005-2010 are found either? Which then means that the drop tables also can't be done.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189026#M1281179</guid>
      <dc:creator />
      <dc:date>2011-04-21T12:28:22Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189027#M1281180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;check the attached qvw. the code works ok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189027#M1281180</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-04-21T12:35:53Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189028#M1281182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think this script may solve ur problem...&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;* INLINE &lt;P&gt;[contact_id,purchase type,count2005,value2005,count2006,value2006,count2007,value2007,count2008,value2008,count2009,value2009,count2010,value2010,loyalty2005,loyalty2006,loyalty2007,loyalty2008,loyalty2009,loyalty2010,purchases2005,purchases2006,purchases2007,purchases2008,purchases2009,purchases2010&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;load&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2005&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2005&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;load&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;2006&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2006&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;load&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;2007&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;load&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;2008&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2008&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2009&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;load&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;2010&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;as Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;contact_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;count2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as count &lt;P&gt;,&lt;/P&gt;&lt;P&gt;loyalty2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as loyalty &lt;P&gt;,&lt;/P&gt;&lt;P&gt;[purchase type]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;purchases2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as purchases &lt;P&gt;,&lt;/P&gt;&lt;P&gt;value2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;as &lt;P&gt;value&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Datatemp;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;drop&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;table &lt;P&gt;Datatemp;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 12:51:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189028#M1281182</guid>
      <dc:creator />
      <dc:date>2011-04-21T12:51:20Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189029#M1281184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;@PatAgen Thanks for that - no idea why it didn't work when I copied the data in on top!&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;I'm still trying to get my head around how this works but it looks like it is doing the grouping as I was hoping would be possible - would it be possible to get an idea of the magic behind this script (as I've only been using qlikview for a few hours now!)&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;In terms of what I was hoping to be able to do in a bar chart was similar to what is in your SumfctCount straight table (with the columns purchase type / year but to instead only have one column per year, with the purchase type stacked and then ideally have the columns sum(fctCount) and sum(fctValue) as options in a list box, so that if you clicked on sm(fctCount) the bar chart would show a stacked bar for each year selected - for example if 2005 all purchases was selected along with the sum(fctCount) option, there would be one bar with 5 sections (all purchases,bike frame,brake pads,lights,saddle) and the numbers for each section would be (12,0,0,2,10) respectively?&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;"&gt;Again, thanks for all your help J&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:02:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189029#M1281184</guid>
      <dc:creator />
      <dc:date>2011-04-21T13:02:43Z</dc:date>
    </item>
    <item>
      <title>Mapping multiple data columns to the same field</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189030#M1281185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;please see the chart in the attached qvw. To toggle between the count and the value use the icon in the bottom left hand corner.&lt;/P&gt;&lt;P&gt;It's not really magic but qlikview can help you do some neat things to transform your data in the script! Not to be ignored.&lt;/P&gt;&lt;P&gt;basically you now have a table with a record per contact_id, per purchase type, per year. More acceptable from a data model perspective than your original data input.&lt;/P&gt;&lt;P&gt;The code shows the use of a variable the "i" in the for each loop. this takes on respectively the values 2005, thru 2010 and then uses this to firstly create the Year field thus allowing your drop down select and secondly to adress the physical fields loaded initially. very versatile and useful.&lt;/P&gt;&lt;P&gt;the "for each" loop which allows you to save on redundant code, ie repaet the same code just changing the variable each time.&lt;/P&gt;&lt;P&gt;the tmpTable needs creating outside the loop so we can then adress it with each loop and simply add on the rows. this is done with a dummy row having purchase type, contact_id. After the loop we remove the dummy row.&lt;/P&gt;&lt;P&gt;we get rid of all temporary tables otherwise qv will start complaining.&lt;/P&gt;&lt;P&gt;if you are happy hit the verify answer button and I'll be happy too. &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;enjoy qlikview!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:33:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-multiple-data-columns-to-the-same-field/m-p/189030#M1281185</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-04-21T13:33:07Z</dc:date>
    </item>
  </channel>
</rss>

