Forum Discussion

Zoombini's avatar
Zoombini
Regular Visitor
8 years ago
Solved

Expanding Tables After Grouping

I'm having some difficulty getting some XML based data into a usable format. After a little cleanup it looks like this:   The red line shows the cutoff where they start repeating. Ultimately ...
  • MarcelBeug's avatar
    MarcelBeug
    8 years ago

    My suggestion would be another approach.

     

    Based on your first table, if each group consists of 28 rows, than you can add an Index column starting with 0, transform this index column using (Transform - Standard - Integer-divide) by 28, and now you can pivot on the first column.

     

    Alternatively, if your groups have a variable number of items (not always 28), but they always start with "Order Date", after adding the Index column you can add another column with formula = if [Columns] = "Order Date" then [Index] else null.

    Fill down this new column, so each group of data will have its own number (the same number within each group).

    Remove the original Index column and now you can pivot on the first column.

     

    Edit: in both scenarios, you can remove the added column after pivoting.