Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Excel to Alteryx with Transposing Columns to Rows

JPSeagull
8 - Asteroid

#Hi. I have been testing all kinds ways of using transpose and cross tabs and I am not able to get exactly the view I need to write data to xydb file.

 

I have three years of data in an Excel file that summarizes two values each date and it appends to the right of 11 categories. This is how sample of the data looks in Excel:

 

Date >8/8/20228/8/20228/7/20228/7/20228/4/20228/4/2022
CategorySite - TotalSite - SalesSite - TotalSite - SalesSite - TotalSite - Sales
Within 7 Days of Due54$2,104.1555$3,892.9357$3,292.99
8 to 15 Days to Due55$1,933.2854$1,786.0754$2,104.15
Up to 7 Days Past Due58$5,023.4457$3,234.6654$1,783.45
8 to 15 Days Past Due54$2,149.3056$2,257.8358$6,926.74
16 to 30 Days Past Due59$6,512.2857$4,542.7258$5,593.95
31 to 60 Days Past Due56$1,383.1656$1,383.1657$1,436.25
More Than 60 Days Past Due58$7,311.9258$7,311.9258$7,072.57
16 to 30 Days to Due78$25,223.8567$27,102.5273$34,765.12
31 to 60 Days to Due161$178,370.49127$93,458.73132$185,245.45
 > 60 Days to Due568$1,189,098.92387$872,103.19557$1,435,681.07
No Category Data176$53.00190$53.00119$53.00

 

This is how I need it to look so I can pivot it in Tableau for visualizations:

 

DateCategorySite - TotalSite - Sales
8/8/2022Within 7 Days of Due54$2,104.15
8/8/20228 to 15 Days to Due55$1,933.28
8/8/2022Up to 7 Days Past Due58$5,023.44
8/8/20228 to 15 Days Past Due54$2,149.30
8/8/202216 to 30 Days Past Due59$6,512.28
8/8/202231 to 60 Days Past Due56$1,383.16
8/8/2022More Than 60 Days Past Due58$7,311.92
8/8/202216 to 30 Days to Due78$25,223.85
8/8/202231 to 60 Days to Due161$178,370.49
8/8/2022 > 60 Days to Due568$1,189,098.92
8/8/2022No Category Data176$53.00
8/7/2022Within 7 Days of Due55$3,892.93
8/7/20228 to 15 Days to Due54$1,786.07
8/7/2022Up to 7 Days Past Due57$3,234.66
8/7/20228 to 15 Days Past Due56$2,257.83
8/7/202216 to 30 Days Past Due57$4,542.72
8/7/202231 to 60 Days Past Due56$1,383.16
8/7/2022More Than 60 Days Past Due58$7,311.92
8/7/202216 to 30 Days to Due67$27,102.52
8/7/202231 to 60 Days to Due127$93,458.73
8/7/2022 > 60 Days to Due387$872,103.19
8/7/2022No Category Data190$53.00
8/4/2022Within 7 Days of Due57$3,292.99
8/4/20228 to 15 Days to Due54$2,104.15
8/4/2022Up to 7 Days Past Due54$1,783.45
8/4/20228 to 15 Days Past Due58$6,926.74
8/4/202216 to 30 Days Past Due58$5,593.95
8/4/202231 to 60 Days Past Due57$1,436.25
8/4/2022More Than 60 Days Past Due58$7,072.57
8/4/202216 to 30 Days to Due73$34,765.12
8/4/202231 to 60 Days to Due132$185,245.45
8/4/2022 > 60 Days to Due557$1,435,681.07
8/4/2022No Category Data119$53.00

 

but the closest I can get is this: 

 

JPSeagull_0-1661789794722.png

I have to figure out how to get the columns correct as well as resolve the dates adding the "_2" and then moved over to first column. 

 

Any advice will be greatly appreciated. Thanks!

10 REPLIES 10
AngelosPachis
16 - Nebula

Hi @JPSeagull ,

 

When reading data from your excel input, one thing that will help is if you select option no6 so Alteryx reads the first row as data and not actual headers

 

AngelosPachis_0-1661791241964.png

 

Then you can split into two streams, one to process the first two rows of data and another one to process the main table

 

AngelosPachis_1-1661791674877.png

 

Hope that helps,

Angelos

binuacs
20 - Arcturus

@JPSeagull One way of doing this

 

binuacs_0-1661792746256.png

 

joelmiller66
9 - Comet

Hi @JPSeagull  Here is another way to solve it.

 

joelmiller66_0-1661794374172.png

 

JPSeagull
8 - Asteroid

@AngelosPachis  - Absolutely Perfect! Thank you. I tweaked it by adding a Unique tool as there were duplicates and triplicates of the same data and dates and placed it right after the Join Tool. Also added a Sort Tool.  Much appreciated!

JPSeagull
8 - Asteroid

@binuacs Thank you! 

JPSeagull
8 - Asteroid

@joelmiller66 Much appreciated. This worked fast with my 3 years of data to transpose! Thank you!

JPSeagull
8 - Asteroid

@AngelosPachis How would I resolve the workflow if the next Excel file has more than 1 Total and 1 Sales column for the same Date with different Categories? I tested different ways, but I cannot seem to figure out how to group the data.

JPSeagull
8 - Asteroid

@joelmiller66 I have another Excel file, but this data has three ownership sites with each having a totals and dollars amount for each day. How would that work? I tried to use your version which worked perfect for the two columns, but it doesn't see to find Category as a field.

 

joelmiller66
9 - Comet

@JPSeagull  Here is a more dynamic solution based on the new YXMD you shared. My workflow is attached.

 

joelmiller66_0-1661814014810.png

 

Labels