Jump to content

Cells parsing to automatically create columns and rows


Recommended Posts

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:

spacer.png

Link to comment
Share on other sites

Hello!

Please try to follow these steps:

  1. 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.
     
  2. 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.
     
  3. 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.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...