<?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 Re: Changing field values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554937#M440602</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Another option may be to use a QV Mapping table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RawData:
Load
	Floor(rand() * 14) as Field1,
	RecNo() as ID
Autogenerate 100
;
	
LabelsMap:
Mapping Load * Inline	
	[Value,Label
	1,1 - Label 1
	2,2 - Label 2
	3,3 - Label 3
	4,4 - Label 4
	5,5 - Label 5
	6,6 - Label 6
	7,7 - Label 7
	8,8 - Label 8
	9,9 - Labeln9
	10,10 - Label 10
	11,11 - Label 11
	12,12 - Label 12];

Load 
	ID,
	Field1,
	ApplyMap('LabelsMap',Field1,'XX - No Label') as Label1
Resident RawData;

Drop Table RawData;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a bit more convoluted, but it has 2 benefits I can think of:&lt;/P&gt;&lt;P&gt;1) Reusability - In case you want to apply the same processing to fields with different column names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Explicit labeling of unmapped&amp;nbsp; values. E.g. in the autogenerate I threw in a 0 and a 13, which are "invalid" values in the source data. The ApplyMap function flags them as such, rather than leaving blanks.&lt;/P&gt;&lt;P&gt;The outcome is best observed with a Table Box with the fields: ID, Field1, Label1 displayed.&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 15:33:06 GMT</pubDate>
    <dc:creator>jwaligora</dc:creator>
    <dc:date>2019-03-11T15:33:06Z</dc:date>
    <item>
      <title>Changing field values</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554885#M440594</link>
      <description>&lt;P&gt;I have a field, (Field1), that contains values 1 through 12. I would like to load this field and apply labels for each numerical value.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;1 AS '1- Label1'&lt;/P&gt;&lt;P&gt;2 AS '2- Label2'&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 13:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554885#M440594</guid>
      <dc:creator>justcotto</dc:creator>
      <dc:date>2019-03-11T13:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing field values</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554919#M440600</link>
      <description>&lt;P&gt;for suppose below is actual table&lt;/P&gt;&lt;P&gt;Facttable:&lt;BR /&gt;Column,Field1&lt;BR /&gt;A,1&lt;BR /&gt;B,2&lt;BR /&gt;C,3&lt;BR /&gt;D,4&lt;BR /&gt;E,5&lt;BR /&gt;F,6&lt;BR /&gt;G,7&lt;BR /&gt;H,8&lt;BR /&gt;I,9&lt;BR /&gt;J,10&lt;BR /&gt;K,11&lt;BR /&gt;L,12&lt;BR /&gt;from database;&lt;/P&gt;&lt;P&gt;//Create a inline table linking to the table and pull "label" field as dimension&lt;BR /&gt;&lt;BR /&gt;Label:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Field1,Label&lt;BR /&gt;1,1- Label1&lt;BR /&gt;2,2- Label2&lt;BR /&gt;3,3- Label3&lt;BR /&gt;4,4- Label4&lt;BR /&gt;5,5- Label5&lt;BR /&gt;6,6- Label6&lt;BR /&gt;7,7- Label7&lt;BR /&gt;8,8- Label8&lt;BR /&gt;9,9- Label9&lt;BR /&gt;10,10- Label10&lt;BR /&gt;11,11- Label11&lt;BR /&gt;12,12- Label12&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 14:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554919#M440600</guid>
      <dc:creator>bharathadde</dc:creator>
      <dc:date>2019-03-11T14:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Changing field values</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554937#M440602</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Another option may be to use a QV Mapping table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RawData:
Load
	Floor(rand() * 14) as Field1,
	RecNo() as ID
Autogenerate 100
;
	
LabelsMap:
Mapping Load * Inline	
	[Value,Label
	1,1 - Label 1
	2,2 - Label 2
	3,3 - Label 3
	4,4 - Label 4
	5,5 - Label 5
	6,6 - Label 6
	7,7 - Label 7
	8,8 - Label 8
	9,9 - Labeln9
	10,10 - Label 10
	11,11 - Label 11
	12,12 - Label 12];

Load 
	ID,
	Field1,
	ApplyMap('LabelsMap',Field1,'XX - No Label') as Label1
Resident RawData;

Drop Table RawData;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a bit more convoluted, but it has 2 benefits I can think of:&lt;/P&gt;&lt;P&gt;1) Reusability - In case you want to apply the same processing to fields with different column names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Explicit labeling of unmapped&amp;nbsp; values. E.g. in the autogenerate I threw in a 0 and a 13, which are "invalid" values in the source data. The ApplyMap function flags them as such, rather than leaving blanks.&lt;/P&gt;&lt;P&gt;The outcome is best observed with a Table Box with the fields: ID, Field1, Label1 displayed.&lt;/P&gt;&lt;P&gt;J.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 15:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554937#M440602</guid>
      <dc:creator>jwaligora</dc:creator>
      <dc:date>2019-03-11T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Changing field values</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554938#M440603</link>
      <description>&lt;P&gt;When you say "Column" in the fact table, are you using this as a placeholder?&amp;nbsp; Or can I simply load my fact table and then load inline after?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 15:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554938#M440603</guid>
      <dc:creator>justcotto</dc:creator>
      <dc:date>2019-03-11T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing field values</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554975#M440605</link>
      <description>&lt;P&gt;you can simply load your fact table and then line load after.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 16:55:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-field-values/m-p/1554975#M440605</guid>
      <dc:creator>bharathadde</dc:creator>
      <dc:date>2019-03-11T16:55:52Z</dc:date>
    </item>
  </channel>
</rss>

