Help with Make Columns Tool
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Alteryx Community
Is there any way to make the make column tool dynamic? By that I mean, if the data is going to change and that changes the number of columns needed is that possible?
If I have something like the below I can crosstab and the make columns based on the fact that I know there are rows of data that will become 10 columns based on my input on the make columns tool.
Date | Quantity | Price | Commission |
3/1/2025 | 1 | 95 | 10 |
3/2/2025 | 2 | 105 | 11 |
3/3/2025 | 3 | 115 | 12 |
3/4/2025 | 4 | 125 | 13 |
3/5/2025 | 5 | 135 | 14 |
But if this data changes tomorrow to say 2 rows of data, is it possible to then tell the workflow to read less data into the crosstab tool and then onwards to the make columns tool?
Date | Quantity | Price | Commission |
3/6/2025 | 1 | 95 | 10 |
3/7/2025 | 2 | 105 | 11 |
Thank you for your time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes, you can set it as variable and then the number of rows will be created by that variable to that specific row.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@OTrieger - Thank you for the response. Would you happen to have an example of something like that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Just putting some helper information below. The attachments are of the current workflow. The tables below are when the underlying data changes and the number of columns in the make columns tool stays the same.
Date | Quantity | Price | Commission |
3/1/2025 | 1 | 95 | 10 |
3/2/2025 | 2 | 105 | 11 |
3/3/2025 | 3 | 115 | 12 |
3/4/2025 | 4 | 125 | 13 |
3/5/2025 | 5 | 135 | 14 |
3/6/2025 | 6 | 145 | 15 |
Name | Value |
Date | 3/1/2025 |
Quantity | 1 |
Price | 95 |
Commission | 10 |
Date | 3/2/2025 |
Quantity | 2 |
Price | 105 |
Commission | 11 |
Date | 3/3/2025 |
Quantity | 3 |
Price | 115 |
Commission | 12 |
Date | 3/4/2025 |
Quantity | 4 |
Price | 125 |
Commission | 13 |
Date | 3/5/2025 |
Quantity | 5 |
Price | 135 |
Commission | 14 |
Date | 3/6/2025 |
Quantity | 6 |
Price | 145 |
Commission | 15 |
Date | |
Quantity | |
Price | |
Commission |
Column_1_Name | Column_1_Value | Column_2_Name | Column_2_Value | Column_3_Name | Column_3_Value | Column_4_Name | Column_4_Value | Column_5_Name | Column_5_Value |
Date | 3/1/2025 | Price | 105 | Date | 3/4/2025 | Price | 135 | Date | |
Quantity | 1 | Commission | 11 | Quantity | 4 | Commission | 14 | Quantity | |
Price | 95 | Date | 3/3/2025 | Price | 125 | Date | 3/6/2025 | Price | |
Commission | 10 | Quantity | 3 | Commission | 13 | Quantity | 6 | Commission | |
Date | 3/2/2025 | Price | 115 | Date | 3/5/2025 | Price | 145 | ||
Quantity | 2 | Commission | 12 | Quantity | 5 | Commission | 15 |
Thank you
