Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Transposing data

Chelseaa
7 - Meteor

Hi all, need some help with transposing again and some formula

 

I have my input data here:

RegionMonthProduct CostTransportSavingsMktg costAdjustments
AMERJan 34-123
AMERFeb23-222
AMERMar22051
APACJan 65-122
APACFeb72-0.534
APACMar53062

 

and the output i would like is this (column 2 is formula based and i put it in algebra form):

RegionMonthTypes of costsColumn 1Column 2
AMERJan Product Costa 
AMERJan Transportba-b
AMERJan Savingscb-c
AMERJan Mktg costdc-d
AMERJan Adjustmentse 
AMERFebProduct Costf 
AMERFebTransportgf-g
AMERFebSavingshg-h
AMERFebMktg costih-i
AMERFebAdjustmentsj 
APACJan Product Cost  
APACJan Transport  
APACJan Savings  
APACJan Mktg cost  
APACJan Adjustments  
APACFebProduct Cost  
APACFebTransport  
APACFebSavings  
APACFebMktg cost  
APACFebAdjustments  

 

Thank you!

3 REPLIES 3
AkimasaKajitani
17 - Castor
17 - Castor

Hi @Chelseaa 

 

I made 2 pattern solution.

 

Pattern 1 is simple solution. But if the column sort order is changed, it will be not work.

Pattern 2 is dynamic solution. If column order is changed, it will work well.

AkimasaKajitani_0-1606798340734.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Chelseaa 

 

Here is my take on it.

 

Multi-row formula

 

IF [Name] IN ("Transport","Savings","Mktg cost") 
THEN [Row-1:Value]-[Value]
ELSE Null()
ENDIF

 

Output:

atcodedog05_0-1606799323901.png

Workflow:

atcodedog05_1-1606799336612.png

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Chelseaa
7 - Meteor

@AkimasaKajitani @atcodedog05 i prefer the more dynamic solution, thank you both for your help!

 

 

Labels
Top Solution Authors