Reputation: 466
I have a base table 'Orders' with a column OrderNo, this column is being used in a visual.
I have another table 'Operations' with columns: OrderNo, OperationNo, TimeTaken (this is just a numeric column). This table is related to base table with OrderNo. Please note that one OrderNo can have multiple OperationNo.
I want to add a column to my visual 'TimeRemaining', which takes all OperationNo (from Operations table) for an OrderNo and sums the TimeTaken column.
How can I achieve this?
Upvotes: 0
Views: 779
Reputation: 129
TimeRemaining =
SUM ( OperationNo[TimeTaken] )
TimeRemaining =
CALCULATE (
SUM ( Operations[TimeTaken] ),
ALLEXCEPT ( Operations, Operations[OrderNo] )
)
NOTE. the first is for a calculated column in Orders table the second one is for the Operations table.
Upvotes: 1