Alteryx Designer Desktop Discussions

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

Data Transformation for attached use case

timewaste
8 - Asteroid

Hello Peers,

 

Sorry if this is a big ask but I would like to request a solution for following use case attached below. I have tried designing a few workflows on my end with Transpose and Cross Tab approaches over last 2 weeks (pretty much same time I have started using Alteryx) but in vain. Appreciate any support in accomplishing this. TIA!

 

Looping in Gurus...

@MarqueeCrew @Kenda @JoshKushner @jdunkerley79 @Joe_Mako @JohnJPS 

 

alteryx case.png

 

 

11 REPLIES 11
vishwa_0308
11 - Bolide

Hi,

 

I have distributed your file into 4 tables like  ORG, SP, Responsibilities, Metadata and then done some calculation to match your look a like output.

Please find the sample attached.

 

transform.jpg

 

Best,

Vishwa

Joe_Mako
12 - Quasar

Attached is one route, I am sure it could be optimized, but I felt this was a good balance for future flexibility, and mostly dynamic.

 

use case.png

JoshKushner
12 - Quasar

Here's one that doesn't split the data very much. It should still be flexible and future-proof (assuming there aren't any more types of items like the 'SP' ones)

 

Flow:

Flow.PNG

 

Results:

Results.PNG

 

Transpose:

Transpose.PNG

 

Cross Tab:

Cross Tab.PNG

 

Multi Row:
Multi Row.PNG

jdunkerley79
ACE Emeritus
ACE Emeritus

Here is my go. Substantially similar to @Joe_Mako:

2017-11-07_10-25-25.jpg

timewaste
8 - Asteroid

@jdunkerley79 @JoshKushner @Joe_Mako @vishwa_0308

 

Appreciate it so much guys!!! I think I came close to two of these approaches by looking at these. Thanks for your time.

 

timewaste
8 - Asteroid

@jdunkerley79 A question from your approach, instead of SP1,SP2,SP3.... so on... ,if I come across data more so like this below.. I mean it doesnt start with 'SP'.

 

What I gave initially:

 

SP114.41.616.0 
SP214.41.616.0 
SP310.81.212.012.0
SP410.81.212.012.0

 

what if the source data looks like:

 

PH14.41.616.0 
AH PHO AH14.41.616.0 
SAT TDM SAT10.81.212.012.0
MON PH ADFD10.81.212.012.0

 

How do I change the expression in REGEX_MATCH? Do I need to add a prefix 'SP' on the fly and deal with it? TIA!

 

Joe_Mako
12 - Quasar

You could have it match on ORG instead of SP, like:

 

REGEX_MATCH([Field1],"ORG\d")

 

jdunkerley79
ACE Emeritus
ACE Emeritus

I'd probably do as @Joe_Mako said (as I like RegEx). But could also do:

STARTSWITH([Field1],"ORG")
timewaste
8 - Asteroid

@jdunkerley79  Another followup question using your workflow... how I can address if I have additional columns coming in the source sheet (other than the org columns as shown below). I have highlighted them in red here below too. Immense thanks once again.

 

Input Data:

 

ORGSSPCATPRIDVID    
ORG1   O11O11O21O21
ORG2   O12O12O22O22
ORG3   O13O13O23O23
ORG4   O14O14O24O24
ORG5   O15O15O25O25
ORG6   FAFV
Subphases       
PHHW13014.41.616.0 
AH PHO AHSW13014.41.616.0 
SAT TDM SATFW13010.81.212.012.0
MON PH ADFDREW13010.81.212.012.0
Responsibilities       
R1   YESYESNONO
R2   NONOYESYES
R3   NONONONO
R4   YESYESNONO
R5   NONOYESYES
R6   NONONONO
R7   YESYESNONO
R8   NONOYESYES
R9   NONONONO
Metadata       
M1   7.507.507.507.50
M2   82828282
M3   1715171517151715
M4   0000
M5   0000
M6   0000

 

Output Data: It would still look the same but with these new 3 additional columns in the output too...

 

Use_Case.png

 

 

 

Labels