Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
May be like this:
If([Payment Methods] = 'Private', 'Out-of-Pocket', [Payment Methods]) as [Payment Methods]
May be like this:
If([Payment Methods] = 'Private', 'Out-of-Pocket', [Payment Methods]) as [Payment Methods]
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.
Thanks Sunny
Thanks Colin for your valuable input