Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Rearrange data

Highlighted
7 - Meteor

 

Hi, 

 

Can someone please advise how to get from the below Input table to the below Output table?

 

Query.PNG

Many thanks for your help in advance.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @SylviaK 

 

Here's a way of doing. Workflow attached.

 

Split your category column into rows using "," as a delimiter. Use the Data Cleansing to remove extra whitespaces. Use the Summarize tool to Group by Category and do the count.

 

Thableaus_0-1593011040282.png

 


Cheers,

Highlighted
9 - Comet

This was a nice quick challenge. Parse tools are one of the biggest hurdles, but most useful tools in Alteryx.

 

I think the attached file has the solution you're looking for!

 

EDIT: ahh @Thableaus beat me to it. Same solution too!

Highlighted
7 - Meteor

Thank you Thableaus. It works perfectly. 

 

However, just realised that my data is in this format, so separating by comma doesn't work. Any ideas?

 

Query.PNG

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@SylviaK 

 

Try using this option in the Text to Columns tool.

 

Thableaus_0-1593022746327.png

 

 

It will ignore any delimiters found inside quotes.

 

Cheers,

Highlighted
7 - Meteor

Brilliant. That works. 

 

after the data into rows, would like to get rid of the quotes around my category. how do I do that?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@SylviaK 

 

Use the Replace expression. Add a formula tool. Add this expression:

 

Replace ([Category], '"', "")

 

You would be replacing quotes for nothing.

 

Cheers,

Highlighted
7 - Meteor

many thanks @Thableaus 

Labels