Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |