Pivoting Data in a Workbook

4 followers
0
Avatar

How can I pivot my rows of data into columns?

Saurabh Agashe

7 comments

  • Avatar
    enaven

    Hi !

    Thanks for the information on pivoting the table.

    Could you please help me understand hoe to perform the pivot for multiple records. In your example I would want count of age across different country.

    The output would have distinct countries and corresponding count of age across columns.

    Your help would be appreciated!

    Thanks

    0
  • Avatar
    Joel Stewart

    enaven, it sounds like these functions would complete your desired analysis: 

    GROUPBY(#MySourceSheet!Country)

    GROUPCOUNT(#MySourceSheet!Age)

    That will provide a distinct list of countries in the first column and a count of the number of records that contain a non-null value for age in the second column. 

    -1
  • Avatar
    enaven

    Hi Joel,

    I am sorry if I was not able to correctly articulate  my problem.

    I would like to pivot the table and get a count of age for each country in different columns.

    I understand GROUPSELECT function would help me find the count of age in different columns, but I would want to find this count for a given country (GROUPBY Country and then GroupbySELECT threw an error)

    your approach would indeed give me the required result but it would be across the rows

    0
  • Avatar
    Joel Stewart

    You would build that as an intermediate work-sheet and then you could use the GROUPSELECT function to pivot the data on a new sheet.

    0
  • Avatar
    srikanth v

    Hi,

    WIth GROUPSELECT function, we can create Pivot with Constant values.. But i have a situation where i want to pivot with Dynamic values. So, how to create Pivot in this case?

    0
  • Avatar
    Joel Stewart

    Srikanth, that's not a capability of that function. Can you share an example though? Perhaps there is an alternative method that could be used for your instance. 

    0
Please sign in to leave a comment.