On April 28, 2021, Google is changing the required permissions for attaching IAM roles to service accounts. If you are using IAM roles for your Google service accounts, please see Changes to User Management.
This example demonstrate the AND
, OR
, and NOT
logical functions.
- See AND Function.
- See OR Function.
- See NOT Function.
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:
Customer | isActive | isInterested |
---|---|---|
CustA | Y | Y |
CustB | Y | N |
CustC | N | Y |
CustD | N | N |
Transformation:
Customers that are both active and interested should receive a phone call:
Transformation Name | New formula |
---|---|
Parameter: Formula type | Single row formula |
Parameter: Formula | AND(isActive, isInterested) |
Parameter: New column name | 'phoneCall' |
Customers that are either active or interested should receive an email:
Transformation Name | New formula |
---|---|
Parameter: Formula type | Single row formula |
Parameter: Formula | OR(isActive, isInterested) |
Parameter: New column name | 'sendEmail' |
Customers that are neither active or interested should be dropped from consideration for the offering:
Transformation Name | New formula |
---|---|
Parameter: Formula type | Single row formula |
Parameter: Formula | AND(NOT(isActive),NOT(isInterested) |
Parameter: New column name | '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:
Transformation Name | Edit column with formula |
---|---|
Parameter: Columns | sendEmail |
Parameter: Formula | IF(phoneCall == "TRUE", FALSE, sendEmail) |
Results:
Customer | isActive | isInterested | dropCust | sendEmail | phoneCall |
---|---|---|---|---|---|
CustA | Y | Y | FALSE | FALSE | TRUE |
CustB | Y | N | FALSE | TRUE | FALSE |
CustC | N | Y | FALSE | TRUE | FALSE |
CustD | N | N | TRUE | FALSE | FALSE |
This page has no comments.