Hi,
I need to add columns to my crosstab dynamically.. I feel like i always have to update it based on my inputs i load.
I would like to add the newly added columns without having to change them here.. I want to leave "Name" and "value" unchecked.
Ie if I load columns 202203, 202204 and so on it should automatially be picked up by the cross tab and not need alteryx.
any help would be appreciated.
Hey @wonka1234 , you will have to create a macro to do so. Please check the below post in which they have modified the XML to change the group by columns in summarize tool. I assume you can use the same approach for cross tab as well.
thanks. Sigh this seems hard.
I have a text input, say 202202, 202203 . I am having trouble dynamically taking these inputs to update the xml as each time it will be different.
Would you please be able to share a dataset? I think this is possible with just a dynamic rename and a record
File_Name | File_Date | 202202 | 202203 |
Alteryx | 202202 | Y | |
Alteryx | 202202 | Y | |
Alteryx | 202202 | Y | |
Alteryx | 202202 | Y | |
Power BI | 202202 | Y | |
Power BI | 202202 | Y | |
Power BI | 202202 | Y | |
Power BI | 202203 | Y | |
Power BI | 202203 | Y | |
Power BI | 202203 | Y | |
so this is a sample input to my crosstab.. but 202203 isnt picked up automatically..
do the number of fields change?
Yes. One or more could be added ( ie 202203 and on). In the same regard, it could just be the one field (ie 2022) .
@Felipe_Ribeir0 getting a few errors at the macro .
Error: mc (175): The Action "Tool #6" has an error: ParseError: unterminated start tag 'Field' at line 2 and column 1
while processing "Action_UpdateRawXml"
ErrorLink: mc (175): https://community.alteryx.com/t5/*/*/ta-p/710269?utm_source=designer&utm_medium=resultsgrid|Record #1: Tool #4: The field "202003" is missing. Compare the tool configuration with the input stream.
Error: mc (175): The output connection "Output9" was not valid
my summarize tool looks to be okay:
and my input to my macro seems to be okay..
@wonka1234 try this version,
but you gonna need to adapt to your dataset, try running the macro with the data inside of it.
With this filter you can control the columns of the group by.