DEV Community

Cover image for #119 — Group by the Expression
Judith-Data-Processing-Hacks
Judith-Data-Processing-Hacks

Posted on

2 1 1 1 1

#119 — Group by the Expression

Problem description & analysis:

Here below is a data table:
source table

Task: We want to group and aggregate by the first two digits of ID, and calculate the total sales of each group.

Solution:

Use SPL XLL and enter the following code:

=spl("=E(?1).groups(left(ID,2):ID;sum(Sales):Sales)",A1:C25)
Enter fullscreen mode Exit fullscreen mode

The results are as follows:
result table


Download esProc Desktop for FREE and keep your workflow intuitive and efficient using SPL XLL!! 🚀✨⬇️

✨SPL download address: esProc Desktop FREE Download

✨Plugin Installation Method: SPL XLL Installation and Configuration

✨References to other rich Excel operation cases: Desktop and Excel Data Processing Cases

✨YouTube FREE courses: SPL Programming

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
judith677 profile image
Judith-Data-Processing-Hacks

👉 Stay tuned for more Excel pro tips with SPL XLL:

Discord
Reddit

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more