Alteryx 中的数据转换
Josh Honken
Senior Associate at Knowesis


$$ $$ $$ 您可以用它来:
条件函数:按条件测试数据
IF、ELSEIFIIF逻辑运算符:组合语句,提高复杂度
AND (&&)OR (||)NOT (!)IF c THEN t ELSE f ENDIF
IF c THEN t ELSE f ENDIF$$
| State | Region |
|---|---|
| Texas | |
| California | |
| Indiana | |
| New York |

IF c THEN t ELSE f ENDIFIF [State] = 'TX' THEN 'South' ELSE 'Not South' ENDIF
$$| State | Region |
|---|---|
| Texas | South |
| California | Not South |
| Indiana | Not South |
| New York | Not South |


IIF(bool, x, y)IIF([State] = 'TX', 'South', 'Not South'$$
| State | Region |
|---|---|
| Texas | South |
| California | Not South |
| Indiana | Not South |
| New York | Not South |


IF c THEN t ELSEIF c2 THEN t2 ELSE f ENDIF
IF [State] = 'TX' THEN 'South' ELSEIF [State] = 'CA' THEN 'West' ELSE 'Other' ENDIF
| State | Region |
|---|---|
| Texas | South |
| California | West |
| Indiana | Other |
| New York | Other |

IF [State]='Texas' AND [City]='Dallas' OR [State]='Texas' AND [City]='Fort Worth'
THEN 'Dallas Fort Worth'
$$
ELSE 'No match' ENDIF
| State | City | Dallas Texas? |
|---|---|---|
| Texas | Dallas | Dallas Fort Worth |
| Arkansas | Dallas | 城市匹配但州不匹配 |
| Texas | Fort Worth | Dallas Fort Worth |
| California | San Francisco | 不匹配 |
CONTAINS(String, Target)CONTAINS([Customer Name],'z')| Customer Name |
|---|
| Claire Gute |
| Sean O'Donnell |
| Pete Kriz |
| Zachary Taylor |
CONTAINS(String, Target)CONTAINS([Customer Name],'z')| Customer Name | Contains Z? |
|---|---|
| Claire Gute | 0 |
| Sean O'Donnell | 0 |
| Pete Kriz | -1 |
| Zachary Taylor | -1 |
本课程数据集:Genesis_LLC_Company_HR_Data.xlsx
| Age | Attrition | BusinessTravel | DailyRate |
|---|---|---|---|
| 51 | 0 | -1 | 684 |
| 52 | 0 | 0 | 699 |
| 42 | 0 | 0 | 532 |
| 47 | 0 | 0 | 359 |

Alteryx 中的数据转换