Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
chitemerere
Specialist
Specialist

Field Value transformation at load time

I am loading data from a data source into my QV document from MSSQL Server.  One of the fields is called 'Payment Method'.  One of the 'Payment Methods'  or field value is 'Private'.

Can i change this value to 'Out-of-Pocket' at load time?  If so, how can this be accomplished?

Regards.

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

If([Payment Methods] = 'Private', 'Out-of-Pocket', [Payment Methods]) as [Payment Methods]

View solution in original post

4 Replies
sunny_talwar

May be like this:

If([Payment Methods] = 'Private', 'Out-of-Pocket', [Payment Methods]) as [Payment Methods]

Colin-Albert

Sunny's suggestion is fine if there is just one change, for multiple changes, create a mapping table and use Applymap.

By default if the mapping does not return a match, then the original value is used.

The advantage of the mapping table is that the list of changes can be easily managed in a spreadsheet or database without the need to change the load script.

chitemerere
Specialist
Specialist
Author

Thanks Sunny

chitemerere
Specialist
Specialist
Author

Thanks  Colin for your valuable input