Forum Discussion

JoelDucharme's avatar
JoelDucharme
Icon for Helper I rankHelper I
2 years ago
Solved

Complete newbie! How to organize data from a complicated SharePoint list

Hi I have a very wide sharepoint list that I need to organize. It looks a bit like this:

IDl1_totall1_projectl1_activityl1_descriptionl2_totall2_projectl2_activityl2_descriptionReceipt #AttachementsSupplier
120$Project 1Activity 1Description110$Project 2Activity 2Description21234

Attachement 1

Attachement2

Attachement 3

Supplier1
2100$Project 3Activity 1Description3123$Project 1Activity 1Description 41235nullSupplier2
325$Project 1Activity 2Description5nullnullnullnullnullnullSupplier3

 

How can I manipulate the data to build a report that might look like this

IDTotalProjectActivityDescriptionReceipt#AttachementsSupplier
120$Project 1Activity 1Description11234Attachements 1,2 and 3Supplier1
110$Project 2Activity 2Description21234Attachements 1,2 and 3Supplier1
2100$Project 3Activity 1Description 31235nullSupplier2
2123$Project 1Activity 1Description 41235nullSupplier2
325$Project 1Activity 2Description5nullnullSupplier3

 

My table is actually alot bigger with 10 project, activity, total, description (and more) collumns. I tried to unpivot, but when I unpivot all those collumns, i only get all the info for one ID. All the others dissapear. And, the new lines created by the unpivots don't seem to line up. When I unpivot the second set of collumns, I get double the lines, and then quadruple, etc.... I'm surely doing something wrong. 

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    JoelDucharme Create 10 queries that each pull only the fields required for each Project group of columns plus the Receipt, #Attachments and Supplier columns. Set them all to not load and then create a query that appends them all together.

  • Thanks for your help. I created all my queries, but how do I append them all together? When I use the "append queries as new", I basically just get the original list. 

    • Greg_Deckler's avatar
      Greg_Deckler
      Icon for Community Champion rankCommunity Champion

      JoelDucharme Use Append Queries as New, select Three or more tables and then add all your tables.

       

      • JoelDucharme's avatar
        JoelDucharme
        Icon for Helper I rankHelper I

        Thanks! That's what I had done and it didn't seem right. I looked at it further and it's what I need. The steps that were missing for me though is I had to combine the differents line collumns. For example, I combined l1_project, l2_project, l3_project, etc... to make one "Project" collumn. After that though, I had a whole bunch of entries that were empty, except for the ID collumn. To remedy that, I made a new combined collumn, deleted the empty ones and then deleted this new collumn to keep it clean. 

         

        All of this worked. Thanks for your help.