Forum Discussion
Is it possible to Ungruoup one column into 3 columns using get & transfrom
Hi Joana,
I assume your source data is in the table (you may use named range as well). Here is step by step instruction after you initiated the query from Data->From Table/range. I tried to simplify as possible.
I tried to upload the screenshots directly to this post, but it doesn't work - something is wrong in my environment or that's due to another update of the portal over weekend. Anyway, they are in the attached Word file.
Steps are:
- Duplicate Article column for future use
- Split Article column on levels columns using comma as delimiter
- Apply Whole Number type the that columns
- Select Level 2 column, in ribbon Add Column -> Conditional Column
- Add logic: select Output as column and add Description if Level2=null
- Fill that column down to substitute null by text
- Ribbon, Add Custom column with logic
Adding to it Description if Level 3 is null and Level 2 is not null. Empty string otherwise to skip Fill down on next step for these records
- Fill that column down
- From ribbon add another conditional column – keep it with empty string if Level3 is null, otherwise Description
- Remove intermediate columns and reorder the rest as you need
- Rename your columns (double click on titles)
- Apply proper types for the columns
- Load query to the table in the desired location
- Format the table as needed and right click on the table to adjust properties not to re-format with query refresh
- As a note: usually I’d prefer to rename steps in query to make them bit more understandable and user friendly (right click on step name and rename)
Please see attached files
Thank your Sergei, with this detail I was able to reproduce your steps in my example and it is now working fine. I am having trouble now to sort by the paragraph numbering column because when I have 2 digits in some of the groups it does not order well. See example bellow. If I order this column it will join the 2.1 with 2.10 and 2.11 and I want 2.1, 2.2,, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 2.10, 2.11 etc.
Do you know a workaround to this? I found a userdefined function that solves this in excel but I dont know how to use userdefined functions in a Crate Custum Column step. do you know any other way?
| 1 |
| 1.1 |
| 1.1.1 |
| 1.1.2 |
| 2. |
| 2.1 |
| 2.1.1. |
| 2.2 |
| 2.2.1 |
| 2.2.2 |
| 3 |
| 3.1 |
| 3.2 |
| 3.3 |
| 3.4 |
| 3.5 |
| 3.6 |
| 3.7 |
| 3.8 |
| 3.9 |
| 3.10 |
| 3.11 |
| 3.12 |
| 3.13 |
| 3.14 |
| 3.15 |
| 3.16 |
| 3.17 |