Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to sum the count split by categories

Hi, I've been using pbi on and off for 4 years, but still struggle to solve some simple questions. I want to understand how to sum the count of accounts for each region. The desired result is shown in the last column (loaded from excel...)

giorgioulani_1-1719249628665.png

Hope somebody could help and explain, thanks 🙂

 

1 ACCEPTED SOLUTION
Ankur04
Resolver II
Resolver II

Hi,

 

try writing the below measure 

 

result = CALCULATE(SUM('Table (4)'[Count of Accounts]),ALLEXCEPT('Table (4)','Table (4)'[Region]))
 
let me know if this helps.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi Ankur, it works, thanks for reaching out. Is that a workaround solution for this particular table, or a best practice for that case? Would it work without issues in a table with more columns? My understanding is that ALLEXCEPT in that formula affects row context and sums values for each region, without being affected by different aggregations e.g. "prepared" column. Thank you 🙂

Ankur04
Resolver II
Resolver II

Hi,

 

try writing the below measure 

 

result = CALCULATE(SUM('Table (4)'[Count of Accounts]),ALLEXCEPT('Table (4)','Table (4)'[Region]))
 
let me know if this helps.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.