#40 — Group And Summarize A Tree Structure Table

Problem description & analysis:

There’s a tree structure Excel table, where the Epic column is the highest data layer.

Task: Group rows by Epic, the highest data layer, and summarize the Hours column while keeping the Code column. Below is the …


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing

Problem description & analysis:

There's a tree structure Excel table, where the Epic column is the highest data layer.

original table

Task: Group rows by Epic, the highest data layer, and summarize the Hours column while keeping the Code column. Below is the expected result:

desired table

Solution:

Use SPL XLL to perform the computation:

=spl("=E(?1).group@i(Epic!=null).new(Code,Epic,ifn(~.sum(Hour),0):Hours)",A1:E10)

As shown in the picture below:

result table with code entered
Explanation:

group@i function performs the conditional grouping. Symbol ~ represents the current group; new()function creates a new table; ifn() function returns the first non-null member (return 0 when the aggregation result on the current group is null).


This content originally appeared on DEV Community and was authored by Judith-Excel-Sharing


Print Share Comment Cite Upload Translate Updates
APA

Judith-Excel-Sharing | Sciencx (2024-08-07T02:26:41+00:00) #40 — Group And Summarize A Tree Structure Table. Retrieved from https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/

MLA
" » #40 — Group And Summarize A Tree Structure Table." Judith-Excel-Sharing | Sciencx - Wednesday August 7, 2024, https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/
HARVARD
Judith-Excel-Sharing | Sciencx Wednesday August 7, 2024 » #40 — Group And Summarize A Tree Structure Table., viewed ,<https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/>
VANCOUVER
Judith-Excel-Sharing | Sciencx - » #40 — Group And Summarize A Tree Structure Table. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/
CHICAGO
" » #40 — Group And Summarize A Tree Structure Table." Judith-Excel-Sharing | Sciencx - Accessed . https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/
IEEE
" » #40 — Group And Summarize A Tree Structure Table." Judith-Excel-Sharing | Sciencx [Online]. Available: https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/. [Accessed: ]
rf:citation
» #40 — Group And Summarize A Tree Structure Table | Judith-Excel-Sharing | Sciencx | https://www.scien.cx/2024/08/07/40-group-and-summarize-a-tree-structure-table/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.