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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jaeshin2
Frequent Visitor

SUM of grouped values when there is one unique value in each row.

How would i get SUM of grouped values when there is one unique value in each row.

 

For below example - 

I need to group by Area and get SUM of Capacity.

Result will be = 12 (Area 4, 5, 6 has value 4)

 

I have tried mesaure like this: 

SUMX(SUMMARIZE('NonBoardRoomOfficeData', NonBoardRoomOfficeData[Place], NonBoardRoomOfficeData[Department], NonBoardRoomOfficeData[Area)], NonBoardRoomOfficeData[Floor]),CALCULATE(Sum(NonBoardRoomOfficeData[Capacity])))
 
This gives me total of 10 rows which is wrong. I am assuming its because each row has unique 'Names'
 
Your help is appriciated! 

 

Location Type NamesPlaceAreaFloorFloorCodeDepartmentCapacity
Work StationHRarea664848th_floorHuman Resources4 
Work StationLucy Gruberarea554848th_floorHuman Resources4 
Work StationStephanie Giacominiarea554848th_floorHuman Resources4 
Work StationSusan Oliverarea554848th_floorHuman Resources4 
Work StationWill Guanarea554848th_floorHuman Resources4 
Work StationRosanna Katrickarea444848th_floorHuman Resources4 
Work StationDax Sardinhaarea444848th_floorHuman Resources4 
Work StationEAarea664848th_floorHuman Resources4 
Work StationSteve Johnsonarea444848th_floorHuman Resources4 
Work StationWinnie Maarea444848th_floorHuman Resources4 
1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @jaeshin2,

it's not right clear what you want to achieve. Here is my solution as far as I have understood you correctly.

 

21-07-_2020_23-45-06.png

 Regards FrankAT

View solution in original post

3 REPLIES 3
FrankAT
Community Champion
Community Champion

Hi @jaeshin2,

it's not right clear what you want to achieve. Here is my solution as far as I have understood you correctly.

 

21-07-_2020_23-45-06.png

 Regards FrankAT

dedelman_clng
Community Champion
Community Champion

Based on what you asked (your expected results don't seem to match the question), you need to bring the value you are summing inside the SUMMARIZE, or SUMX won't know what to look at:

 

Total Capacity = 
SUMX (
    SUMMARIZE (
        'NonBoardRoomOfficeData',
        NonBoardRoomOfficeData[Place],
        NonBoardRoomOfficeData[Department],
        NonBoardRoomOfficeData[Area],
        NonBoardRoomOfficeData[Floor],
        "Capacity", SUM ( NonBoardRoomOfficeData[Capacity] )), //This is the new line
[Capacity] )

 

capacity.png

If you really only want to see "4" for each area, and 12 as the total, create the table from Summarize as a calculated table (CalcTable), using MIN instead of SUM, then your measure would be

 

Total Capacity = SUM( CalcTable[Capacity] )

 

Hope this helps

David

 

parry2k
Super User
Super User

@jaeshin2 sorry not fully clear what you are looking for, can you elaborate bit more? You want to sum capacity by area or what? Not sure what you mean by 4,5,6 and value 4



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors