Hi all:
I've prepared a dataset using Alteryx like below. First 3 columns of it are static and the last column is a Dynamic or Unknown Column and there can more columns appear in future. Please note, all the dynamic columns will have the prefix 'pre-usage'.
I need to apply filter on this dataset based on conditions [Usage_1 > 50,000 or Usage_2 > 1,000 or for any record there is dynamic column, that Acct_id should also appear on output] to catch exceptions.
Now we can apply filter on Usage columns but how to filter dynamic or unknown columns which I don't have any visibility yet. Can someone help me out with this?
Input
Acct_id | Usage_1 | Usage_2 | pre-usage_1 |
34365119 | 99,830 | 5,345 | 0 |
83392043 | 82,777 | 545,456 | 453 |
38298423 | 10 | 50 | 0 |
12334432 | 0 | 0 | 10 |
64434353 | 100 | 5000 | 0 |
76756756 | 200 | 40 | 0 |
Output
Acct_id | Usage_1 | Usage_2 | pre-usage_1 |
34365119 | 99,830 | 5,345 | 0 |
83392043 | 82,777 | 545,456 | 453 |
12334432 | 0 | 0 | 10 |
64434353 | 100 | 5000 | 0 |
Thanks!
Solved! Go to Solution.
There are several ways to dynamically filter on unknown columns. One way is to use the Transpose Tool.
See attached workflow. Please mark solved if this answers your question.
I assume you filter condition is as below
1. For [Usage_1 > 50,000 or Usage_2 > 1,000
2. OR, For dynamic columns, if the name of columns contains "pre-usage", then it should have value ">0"
based on above assumption, I would take approach as below