Nydia Neuss Posted March 17, 2023 Share Posted March 17, 2023 Hello Community! Do you have any smart ways of generating rows and/or columns based on column values? The current situation that I have is that I would like to duplicate rows the amount of times given in one cell in a table and create a number of columns based on another cell. Concrete example would be as below: Want to know more? Link to comment Share on other sites More sharing options...
Alessandro Piazza Posted March 22, 2023 Share Posted March 22, 2023 Hello! Please try to follow these steps: Split Attributes (right click on the attribute in the left panel of Data Manager) -> by fixed string -> |. (If you want to keep the original column, create a copy before splitting it). This will generate as many columns as the substrings delimited by |. The new columns will be called something like Reference Column-0, Reference Column-1. ToLong transforming all the attributes whose name starts with “Reference Column-”. (you can use “Filtered List” in Reshape To Long). This will generate a Long_1 (not relevant) and a Wide_1 column. Split Attribute as at point 1 on the Wide_1 column using - as separator. The columns generated by SplitAttribute should be the output you were expecting. 1 Want to know more? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.