community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

dynamic crosstab

Asteroid

Hello,

 

I have a datafile that I'm trying to crosstab dynamically, but I got stuck.

The "group by" fields are variable, but I know that my header field is named "crosstab_string" and the datafield is "Value".

 

I have an input file telling me which fields are the group by fields, so I tried to build the XML and then use a macro to dynamically update the raw XML.

 

Attached is my attempt at a dynamic approach.

 

 

I get an error saying:

dynamic_crosstab (7) The Action "Tool #6" has an error: ParseError: Unterminated start tag, 'Methods' at line 1 and column 265¶while processing "Action_UpdateRawXml"

 

 

The macro also keeps telling me "FieldA" is not contained in the record (fieldA is in the macro itself, to serve as dummy data)...

 

 

Can somebody please help?

 

Thanks,

Mikis

Alteryx Certified Partner
Alteryx Certified Partner

@Mikis

 

You're going to kick yourself, but it looks like you just forgot a single '>' character. Update your Formula (6) tool with the following formula:

 

[crosstab_xml]  + '</GroupFields> <HeaderField field="crosstab_string" /> <DataField field="Value" /> <Methods> <Method method="First" /> </Methods> </Configuration>'

 

 

I added that and it worked as expected. 

Asteroid

I'll be damned

 

haha, I spent over an hour trying to figure that out

Labels