This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have been stuck on this for a day now, it seems so simple but I am struggling to find the solution. I am looking to create all possible scenarios based upon two options.
Example 1
My Data
Option 1 | Option 2 |
Apple | On |
Orange | Off |
Desired Outcome
Scenario | Option 1 | Option 2 |
1 | Apple | On |
1 | Orange | On |
2 | Apple | On |
2 | Orange | Off |
3 | Apple | Off |
3 | Orange | On |
4 | Apple | Off |
4 | Orange | Off |
Example 2
My Data
Option 1 | Option 2 |
Apple | On |
Orange | Off |
Cherry |
Desired Outcome
Scenario | Option 1 | Option 2 |
1 | Apple | On |
1 | Orange | On |
1 | Cherry | On |
2 | Apple | On |
2 | Orange | On |
2 | Cherry | Off |
3 | Apple | On |
3 | Orange | Off |
3 | Cherry | On |
4 | Apple | On |
4 | Orange | Off |
4 | Cherry | Off |
5 | Apple | Off |
5 | Orange | On |
5 | Cherry | On |
6 | Apple | Off |
6 | Orange | On |
6 | Cherry | Off |
7 | Apple | Off |
7 | Orange | Off |
7 | Cherry | On |
8 | Apple | Off |
8 | Orange | Off |
8 | Cherry | Off |
Solved! Go to Solution.
@iellingsonbg the append fields tool would be a tool of interest in this use case. let me know if you run into any issues.
@DiganP wrote:@iellingsonbg the append fields tool would be a tool of interest in this use case. let me know if you run into any issues.
Yes I have tried the append fields as this seems the natural solution but I have been unable to find the correct pattern to get it to produce the desired result.
@iellingsonbg I attached a sample workflows, hopefully that helps.
This works perfectly for the 2 fruit. However when I introduce the 3rd fruit my scenarios do not line up properly (even when modifying to include 3 options per scenario rather than just 2).
I solved this for a dynamic set of option 1 items and a fixed set of On/Off values. I'm happy to share my solution with you if you private message me. I'd like to suggest this as a weekly challenge to Alteryx @JoeM .
Cheers,
Mark