Pivoting Data in a Workbook
How can I pivot my rows of data into columns?
-
Official comment
If you're asking how to convert rows in to columns, you can use the GROUPSELECT function. All you need to know is the constant of the value you'd like in each column. Here's the detailed explanation and usage instructions:
https://documentation.datameer.com/documentation/display/DAS30/Pivoting+with+GROUPSELECT
I hope that helps!
Comment actions -
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
-
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.
-
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
Please sign in to leave a comment.
Comments
7 comments