cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
santiago01
Frequent Visitor

Calculate Sum based on another column

Hello,

I have a table with projects and hours. Each project has a corresponding proposal number.

 

SNAG-0057.jpg

 

How can I create a measure that adds all the hours for the corresponsing proposal and show them along side the project hours?

 

SNAG-0058.jpg

 

I tried

Measure = CALCULATE(SUM(Table[Hours]),FILTER(ALL(Table),Table[Project_Number]=Table[Proposal_Number]))
1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@santiago01 ,

 

You can create a measure using DAX below:

SumProjectHours = CALCULATE(SUM('Table'[Hours]), ALLEXCEPT('Table', 'Table'[Project_Number], 'Table'[Proposal Number]))

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@santiago01 ,

 

You can create a measure using DAX below:

SumProjectHours = CALCULATE(SUM('Table'[Hours]), ALLEXCEPT('Table', 'Table'[Project_Number], 'Table'[Proposal Number]))

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors