Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 649

Compute Data based on multiple headers inside a table

$
0
0

I need to normalize a table. My RAW table consist of Months, Team Names, and several unique KPI headers in a single table. However, these headers are found every 4 rows inside a single table that define what each values are for underneath them, and these headers aren't identical in each column. I want to normalize it and get its computation based on Month, Team, and unique headers. I hope I am able to explain my goal here, but here is an example of what I am trying to achieve.

If you noticed, I only have Month and Team as my identical column headers, but their KPI headers started to go random afterwards, I need to get a computation (SUM for example) as the expected result (See Row 15 "Expected Result").

enter image description here

PS: I didn't finish the result and only did the first column "Column 1" which gets the total sum from all "Columns 1" from Sample RAW data, based from the Month and Team on the left (Column A & B)

I hope anyone can get it, I really don't know how to clearly explain it but I am tasked of something like this and I can't find a quick solution to sort this out.

Below is the text version of my screenshot.

Thanks in advance!

Sample Raw Data Table

Month   Team    Column 1    Column 2    Column 3    Column 4    Column 5    Column 6                    June    Alpha   12  23  34  56  67  89                  June    Bravo   56  67  89  12  23  34                  June    Charlie 67  89  12  34  56  67                  Month   Team    Column 1    Column 2    Column 3    Column 5    Column 6    Column 7    Column 8                July    Alpha   34  23  2   12  34  2   12              July    Bravo   53  34  13  31  24  1   12              July    Charlie 54  34  15  76  23  54  23              Month   Team    Column 1    Column 2    Column 3    Column 5    Column 8    Column 9    Column 10   Column 11           August  Alpha   23  56  78  98  12  33  11  55          August  Bravo   5   62  32  72  65  41  2   12          August  Charlie 32  43  23  53  21  35  54  11          

Expected Output

Month   Team    Column 1    Column 2    Column 3    Column 4    Column 5    Column 6    Column 7    Column 8    Column 9    Column 10   Column 11June    Alpha   12                                      July    Bravo   53                                      August  Charlie 32                                      

Viewing all articles
Browse latest Browse all 649

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>