Forum Discussion
liz123395
May 21, 2024Copper Contributor
Unclear which way to go about data analysis
Hi I have a list of companies where there are up to 3 founders in each with their own demographics all in the same row. I am looking for a way to analyze the demographics of each company by person. S...
PeterBartholomew1
May 22, 2024Silver Contributor
It all depends upon the consistency of your data and the version of Excel that you use. For example, you may need to filter the demographics rows from the table to separate it from financial data. If name, gender and ethnicity data form a regular pattern, you could use WRAPROWS to return a pivot table normalised array. If you were using 365 beta, you could pivot this to build a table that counts individuals by gender and ethnicity. There are rather a lot if 'ifs' here!
= LET(
demographics, FILTER(companyData, dataType="demographics"),
array, WRAPROWS(TOCOL(demographics), 3),
name, CHOOSECOLS(array, 1),
gender, CHOOSECOLS(array, 2),
ethnicity, CHOOSECOLS(array, 3),
PIVOTBY(gender, ethnicity, name, COUNTA)
)
The sort of result this might generate would be of the form