Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to output every combination of outcomes based on Tile

Chris_Soldi
6 - Meteoroid

Hi

 

I have an issue where I need to identify every possible combination of 'group' choices to achieve 'individual' outcomes.

 

As a bit of context, each user requires access to several menus (represented by the tiles below) but access is given on a role basis (which provides access to many menus) which is represented by the Tile Seq.

 

I need to identify what combination of roles (i.e. Tile Seqs) can be used to provide the user with the menus (tiles) that are needed. 

 

A hypothetical example is below (what combinations of tile seqs are available to achieve all tile numbers):

 

Tile Number

Tile Seq 1

Tile Seq 2

Tile Seq 3

1

A

 

 

2

A

D

 

3

B

G

H

 

Possible combinations:

 

AAB

AAG

AAH

ADB

ADG

ADH

 

Does anybody know how to achieve this outcome (i.e. all the possible combinations) using Alteryx? 

 

I note that the amount of tiles and tile sequences for each tile will differ each time the workflow is run. Just to add some complexity!

 

6 REPLIES 6
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @Chris_Soldi 

there is an almost identical problem in the weekly challenge on the horse race “Pony Permutations”

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-270-Pony-Permutations/td-p/766962
You can adapt from that to find combinations 

cheers

dawn 

T_Willins
14 - Magnetar
14 - Magnetar

HI @Chris_Soldi,

 

An iterative macro will do this pretty easily.  The workflow and macro may take a little adjusting with your actual data, but it should be similar to this.

 

Macro.pngWorkflow.png

Chris_Soldi
6 - Meteoroid

Hi Dawn,

 

I see my problem being a bit more complex as:

 

- The horse problem is similar to how many unique combinations of tiles can be created, rather than how many unique combinations of tile+tile sequences there are.

- The horse problem has a defined number of tiles, where this problem has an undefined number of tiles and tile sequences each time the workflow is run. For example, the initial user i am examining needs 23 menus (i.e. tiles) and each tile can be achieved by between 2-52 roles (i.e. tile sequence numbers) depending on which tile it is.

 

There will be many thousands of combinations.

DawnDuong
13 - Pulsar
13 - Pulsar

Hi @Chris_Soldi 

That’s why i mean “adapt”. You can see how it is done and modify to expand. There should be 2N-1 combinations if you have N tiles... so iterative macro will do the trick for you.

@T_Willins  Has generously given a sample workflow too, where you can take an idea and modify to suit your needs.

give it a try

dawn

Chris_Soldi
6 - Meteoroid

Thanks for your time, looks like i need to do some learning on iterative macros!

Chris_Soldi
6 - Meteoroid

Thank you for this and for pointing me in the right direction.

 

Time to go and learn some iterative macros!

Labels