Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

dynamic crosstab

Mikis
8 - 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

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

@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. 

Mikis
8 - Asteroid

I'll be damned

 

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

Labels