Hi everyone,
I'm new to Alteryx and seek some advise on the following issue. I want to search a dataset dynamically depending on input from a second file or a third file (or more).
Example:
Dataset
| Numeration | Product | FVM LEVEL |
| 1 | Bond | 1 |
| 2 | Bond | 1 |
| 3 | Derivative receivable | 3 |
| 4 | Derivative receivable | 2 |
second file
| Name | Decision_Variable | Contains |
| Derivative | Product | Deriv |
third file
| Name | Decision_Variable | Contains |
| Level 1 | FVM LEVEL | 1 |
Second and third file are 2 sheets from the same excel workbook and I know how to run through via macro. The following dynamic search should be included in said macro.
In this example, when the second file is "active", I would like the workflow to search in field [Product] (Decision_Variable of second file) of the dataset for entries that contain "Deriv". A new field [Cluster] should be added to the dataset that contains "Derivative" ([Name] second file), if cell in the same row and column [Product] contains "Deriv".
When the third file is "active" the workflow should search in field [FVM Level] (Decision_Variable of thrid file) of the dataset for entries that contain 1. If found add "Level 1" to new column [Cluster].
Result from first second file:
| Numeration | Product | FVM LEVEL | Cluster |
| 1 | Bond | 1 | |
| 2 | Bond | 1 | |
| 3 | Derivative receivable | 3 | Derivative |
| 4 | Derivative receivable | 2 | Derivative |
Result from third file:
| Numeration | Product | FVM LEVEL | Cluster |
| 1 | Bond | 1 | Level 1 |
| 2 | Bond | 1 | Level 1 |
| 3 | Derivative receivable | 3 | |
| 4 | Derivative receivable | 2 | |
I have tried to solve this by appending second/third file with the Append Fields tool as new columns to the dataset and creating column "cluster" with an if statement in a formula tool, but how to address the columns in the dataset dynamically depending on the Decision_Variable.
Thanks for you help in advance,
Y_B