Hello, So I need to know how to calculate the...

Hello, So I need to know how to calculate the sum of a number for multiple records associated with a company.

Example: I have a company master record, that has an associated table that holds pieces of equipment.

ABC Company has 5 pieces of equipment.

Each piece of equipment is held in the estimate table which is related to the Company Table. I want to sum the total amount of hours for each individual piece of equipment that is held in the estimate table, which is again related to the master Company table.

When I calculate SUM(estimate[annual tasking time] it gives me ALL the hours associated in the estimate table for every piece of equipment for every record.

It combines all companies together. I want to sum ONLY the time for each record associated with a particular company.

How do I do this?

I assume I have to tell it to only SUM certain records, though I donโ€™t know how to write this. Thanks in advanceโ€ฆ

0 4 325
4 REPLIES 4

@Steven_Jeffery Try SUM(SELECTโ€ฆ, etc

So if I wanted to pull total hours from a table for certain company.

sum(select([company],[hours]) ?? I know that is not right, but how would I write it?

SUM(SELECT(ESTIMATE[Total Annual PM Time], [Company] =

[_THISROW].[Company])) I think I figured it out.

Cool, sorry was on my phone .

Top Labels in this Space