Transformarea datelor în Alteryx
Josh Honken
Senior Associate at Knowesis


$$ $$ $$ Îl puteți utiliza pentru:
Funcții condiționale: testează datele față de o condiție
IF, ELSEIFIIFOperatori logici: combină instrucțiuni și permit o complexitate sporită
AND (&&)OR (||)NOT (!)IF c THEN t ELSE f ENDIF
IF c THEN t ELSE f ENDIF$$
| Stat | Regiune |
|---|---|
| Texas | |
| California | |
| Indiana | |
| New York |

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


IIF(bool, x, y)IIF([State] = 'TX', 'South', 'Not South'$$
| Stat | Regiune |
|---|---|
| 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
| Stat | Regiune |
|---|---|
| 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
| Stat | Oraș | Dallas Texas? |
|---|---|---|
| Texas | Dallas | Dallas Fort Worth |
| Arkansas | Dallas | Orașul se potrivește, dar nu și statul |
| Texas | Fort Worth | Dallas Fort Worth |
| California | San Francisco | No match |
CONTAINS(String, Target)CONTAINS([Customer Name],'z')| Nume client |
|---|
| Claire Gute |
| Sean O'Donnell |
| Pete Kriz |
| Zachary Taylor |
CONTAINS(String, Target)CONTAINS([Customer Name],'z')| Nume client | Conține Z? |
|---|---|
| Claire Gute | 0 |
| Sean O'Donnell | 0 |
| Pete Kriz | -1 |
| Zachary Taylor | -1 |
Setul de date pentru acest curs este: Genesis_LLC_Company_HR_Data.xlsx
| Vârstă | Attrition | BusinessTravel | DailyRate |
|---|---|---|---|
| 51 | 0 | -1 | 684 |
| 52 | 0 | 0 | 699 |
| 42 | 0 | 0 | 532 |
| 47 | 0 | 0 | 359 |

Transformarea datelor în Alteryx