Forum Discussion

Anonymous's avatar
Anonymous
Apr 12, 2018
Solved

Transposing problem

I have a dataset of more than 2000 mutual funds, for these funds I have data over time for different characteristics like return and certain industry weights in their portfolio.

 

The problem here is, is that per mutual fund I have one row containing all the data. The data for the particular characteristic per time period is divided per column. And the dates of the different characteristics is only in the column header, so not in a seperate cell or anything. To be able to analyse the data I need it in a panel data format where every mutual fund has got the seperate time periods with all the data standing besides it, and that for every fund in my sample. 

 

I do not think I can use the transpose function because of the sheer number of characteristics that need transposing. Do you have any suggestions to solve this problem?

 

Thanks in advance!

In the attachment you can find the data for one fund, so you can see my problem.

  • Hi Jur,

     

    That could be done with Power Query (aka Get&Transform). Convert source to the Excel table, with one query form left side with chronological data, another query for static one, append second to first and generate final table.

     

    Please see attached. That's done without cosmetic, consider as prototype.

11 Replies

  • Tomasz Kocur's avatar
    Tomasz Kocur
    Brass Contributor

    Hi Jur

    Try this :

     

    1 on your worksheet click in order (not all together) Alt D P,  it will open the PivotTable Wizard

    2 on the window choose Multiple consolidations ranges 

    on the window choose I will Create the page fields 

    4 choose the range you are interested (Sheet1!$A$1:$BTA$2) click Add then Next

    5 choose New worksheet

    6 on the new worksheet with the pivot table level only Count of Value (see the file)

     

    Count of Value

    727

     

    7 double click on the number it will create a new worksheet with data transposed to kind of database table records 

     

    What do you think about that? 

     

    it's working great when you have a few worksheets transpose to database 

     

     

    • Anonymous's avatar
      Anonymous

      Thanks for your reply, I have a more precise description of the problem now and I am curious if this works for this particular problem as well:

       

      Hello everybody,

      I am having problems transposing data in Excel. I have a large dataset of around 2000 mutual funds, for these funds I have cross sectional data and time series data for four different variables: Returns, concentration, active share and fund size.
      Per row there is one fund with all the accompanying data in the columns right from that cell for all the time series data and other variables.

      The problem here is that I cannot find a solution for how to transpose the dataset to a panel format. In the attachment you find an example of the data for three mutual funds and what the desired sollution is to the problem.
      That is the best way I can describe it to you I figured. 

      Thanks in advance,
      All pointers/tips/tricks are very welcome!

      Hoekstraat

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Hi Jur,

         

        That could be done with Power Query (aka Get&Transform). Convert source to the Excel table, with one query form left side with chronological data, another query for static one, append second to first and generate final table.

         

        Please see attached. That's done without cosmetic, consider as prototype.

Resources