Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to Transform data into Matrix format

peyton-louden
7 - Meteor

Hello, 

 

I need some assistance transforming some data from a horizontal format to a matrix-like format. So the data is setup in a rule-like format where one rule takes up two row in the data.

 

You can see from the example below how it is setup:

peytonlouden_0-1637170464199.png

The first line is the condition and the second line is the result: if the number 12142004 is in Ohio then it is EXEMPT. 

 

This is the format needed and I am having trouble transforming because of the two lines of a rule:

peytonlouden_1-1637170579130.png

I've attached some sample data for reference. 

 

If anyone could provide a solution or some advice, would be much appreciated.

Thanks!

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@peyton-louden 
Hope this is what you need.

1118-peyton-louden.PNG

peyton-louden
7 - Meteor

This was exactly what I looking for! Thanks! 

 

Could you give a brief explanation of what is actually happening? I see the REGEX expression but truthfully, I don't know what it is actually doing. 

Qiu
21 - Polaris
21 - Polaris

@peyton-louden 
The RegEx is used to judge if we are having a numeric string or not.
Check this and it is helpful.

https://regex101.com/

peytonlouden_0-1637170464199.png

Labels