Product Feature: Field Derivations
Products affected: Portrait Miner
Products affected: Portrait Miner
When deriving a new field in Portrait Miner, for example building a case statement to match several different Post Area values back to Regions; rather than checking each individual string value with an 'equals to' the 'strmember()' function can be used, which is similar to the SQL ‘IN’ function.
So rather than using ‘=’ to check each value:
CASE
POST_AREA = "GY" : "Channel Isles";
POST_AREA = "JE" : "Channel Isles";
POST_AREA = "CB" : "East Anglia";
POST_AREA = "CO" : "East Anglia";
...
The field derivation would take the format:
case
strmember(POST_AREA, "GY", "JE") : "Channel Isles";
strmember(POST_AREA, "CB", "CO", ...) : "East Anglia";
...
So rather than using ‘=’ to check each value:
CASE
POST_AREA = "GY" : "Channel Isles";
POST_AREA = "JE" : "Channel Isles";
POST_AREA = "CB" : "East Anglia";
POST_AREA = "CO" : "East Anglia";
...
The field derivation would take the format:
case
strmember(POST_AREA, "GY", "JE") : "Channel Isles";
strmember(POST_AREA, "CB", "CO", ...) : "East Anglia";
...
UPDATED:
March 24, 2017