DEV Community

Cover image for #120 — Group by Segment
Judith-Data-Processing-Hacks
Judith-Data-Processing-Hacks

Posted on

2 1 1 1 1

#120 — Group by Segment

Problem description & analysis:

Here below is a data table:

source table

Task: We want to count the number of people in each of the following score segments respectively: below 50, 50–60, 60–70, 70–80, 80–90, and above 90.

Solution:

Use SPL XLL and enter the following code:

=spl("=E(?1).groups(if(Score<50:""<50"",Score>=50 && Score<60:""50-60"",Score>=60 && Score<70:""60-70"",Score>=70 && Score<80:""70-80"",Score>=80 && Score<90:""80-90"";"">=90""):Score;count(1):Num)",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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (1)

Collapse
 
judith677 profile image
Judith-Data-Processing-Hacks

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

Discord
Reddit

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more