Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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?
Hi @Anonymous ,
I made a sample data as follows.
Try this measure
SUM BY OrderNo =
CALCULATE (
    SUM ( Operations[TimeTaken ] ),
    FILTER ( ALLSELECTED ( Operations ), [OrderNo] = MAX ( 'Operations'[OrderNo] ) )
)
Please check my attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, I have created a new question for the issue.
https://community.powerbi.com/t5/Desktop/Why-this-visual-is-showing-extra-rows/m-p/2134605#M788368
Thank you
Thank you for the reply.
I see that this formula and using a SUM(TimeTaken) yields the same result.
I will open a new question for this one, as the problem seems to be elsewhere.
@Anonymous , hope these tables are joined on the order number.
If you are using the duration/time type column, you need to do little bit of work to add that
refer if these can help in that
https://radacad.com/calculate-duration-in-days-hours-minutes-and-seconds-dynamically-in-power-bi-using-dax
https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-in-dax.aspx
The TimeTaken column can just be treated as numeric column. Yes, the tables are joined on OrderNo. I have updated the question
@Anonymous , if you need a new column in Table1
sumx(relatedtable(Table2), Table2[Time taken])
in case of measure
sum( Table2[Time taken])
should do
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.