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
Anonymous
Not applicable

Sum column with values to get same value for entire column

Hi everyone,

 

Looking to get "Total Man Hour Cost".

it uses the columns "Project Name, "Year", "Element Categoru", "Organization", and "Cost"

There are more columns in the data set, so that's the reason why I list the needed columns to calculate "Total Man Hour Cost"

 

Any advice on this?

 

Project NameYearElement CategoryOrganisationMonthCostTotal Man Hour Cost
AAA2023Man Hour CostCOOJan14212
AAA2023Man Hour CostCOOFeb14212
AAA2023Man Hour CostCOOMar14212
AAA2023Man Hour CostCOOApr14212
AAA2023Man Hour CostCOOMay14212
AAA2023Man Hour CostCOOJun14212
AAA2023Man Hour CostCOOJul14212
AAA2023Man Hour CostCOOAug14212
AAA2023Man Hour CostCOOSep14212
AAA2023Man Hour CostCOOOct14212
AAA2023Man Hour CostCOONov14212
AAA2023Man Hour CostCOODec14212
AAA2023Man Hour CostCOOOct16,8212
AAA2023Man Hour CostCOONov16,8212
AAA2023Man Hour CostCOODec16,8212
BBB2023Man Hour CostCOOJan1116
BBB2023Man Hour CostCOOFeb1116
BBB2023Man Hour CostCOOMar1116
BBB2023Man Hour CostCOOApr1116
BBB2023Man Hour CostCOOMay1116
BBB2023Man Hour CostCOOJun1116
BBB2023Man Hour CostCOOJul1116
BBB2023Man Hour CostCOOAug1116
BBB2023Man Hour CostCOOSep1116
BBB2023Man Hour CostCOOOct1116
BBB2023Man Hour CostCOOJan9116
BBB2023Man Hour CostCOOFeb9116
BBB2023Man Hour CostCOOMar9116
BBB2023Man Hour CostCOOApr9116
BBB2023Man Hour CostCOOMay9116
BBB2023Man Hour CostCOOJun9116
BBB2023Man Hour CostCOOJul9116
BBB2023Man Hour CostCOOAug9116
BBB2023Man Hour CostCOOSep9116
BBB2023Man Hour CostCOOOct9116
BBB2023Man Hour CostCOONov9116
BBB2023Man Hour CostCOODec9116
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You just need to modify the formula a bit like below:

 

Sumx(filter(Table, [Project Name] = earlier([Project Name]) && [Year] =earlier([Year]) && [Element Category] = earlier([Element Category]) && [Organisation] ="COO"), [Cost])

 

Best Regards,
Jing

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , You can have a new calculated column like

 


Sumx(filter(Table, [Project Name] = earlier([Project Name]) && [Year] =earlier([Year]) && [Element Category] = earlier([Element Category) && [Organisation] =earlier([Organisation)), [Cost])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak  Thanks for your input! It works very well.

One thing I forgot to mention is the column "Organization" has multiple values and I only want "COO".
Is there a way to filter on "Organization"? 

Anonymous
Not applicable

Hi @Anonymous 

You just need to modify the formula a bit like below:

 

Sumx(filter(Table, [Project Name] = earlier([Project Name]) && [Year] =earlier([Year]) && [Element Category] = earlier([Element Category]) && [Organisation] ="COO"), [Cost])

 

Best Regards,
Jing

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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