Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

NOTE:  Trifacta Wrangler is a free product with limitations on its features. Some features in the documentation do not apply to this product edition. See Product Limitations.

   

This example demonstrate the AND, OR, and NOT logical functions.

In this example, the dataset contains results from survey data on two questions about customers. The yes/no answers to each question determine if the customer is 1) still active, and 2) interested in a new offering.

Source:

CustomerisActiveisInterested
CustAYY
CustBYN
CustCNY
CustDNN

Transform:

Customers that are both active and interested should receive a phone call:

derive type:single value:AND(isActive, isInterested) as:'phoneCall'

Customers that are either active or interested should receive an email:

derive type:single value:OR(isActive, isInterested) as:'sendEmail'

Customers that are neither active or interested should be dropped from consideration for the offering:

derive type:single value:AND(NOT(isActive),NOT(isInterested) as:'dropCust'

A savvy marketer might decide that if a customer receives a phone call, that customer should not be bothered with an email, as well:

set col:sendEmail value:IF(phoneCall == "TRUE", FALSE, sendEmail)

Results:

CustomerisActiveisInteresteddropCustsendEmailphoneCall
CustAYYFALSEFALSETRUE
CustBYNFALSETRUEFALSE
CustCNYFALSETRUEFALSE
CustDNNTRUEFALSEFALSE

  • No labels

This page has no comments.