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.
Hi,
So I have data in a table I labelled VesselLoadDischarge that breaks down the number of containers by Discharge and Load per Vessel as shown in the image below:
I am trying to add a new column (say called SummedUnitCount) that sums the "UnitCount" column by VesselVisitCode column; ie: the first two rows would each have 642 (the sum of each row from the UnitCount column with VesselVisitCode = SCB3129 which is 377 +265), the next two rows would have 533 each (the sum of each row from the UnitCount column with VesselVisitCode = ALO3372 which is 304 + 229) and so on.
Note: It is not guaranteed that every entry in VesselVisitCode occurs twice, however, it is guaranteed that there can't be more than two entries per VesselVisitCode
Appreciate your assistance.
Solved! Go to Solution.
HI @VictorR
This calculated column gets pretty close. I have attached a pbix file
SummedUnitCount = SUMX( FILTER( 'Table1', 'Table1'[VesselVisitCode] = EARLIER('Table1'[VesselVisitCode]) ), 'Table1'[UnitCount])
HI @VictorR
This calculated column gets pretty close. I have attached a pbix file
SummedUnitCount = SUMX( FILTER( 'Table1', 'Table1'[VesselVisitCode] = EARLIER('Table1'[VesselVisitCode]) ), 'Table1'[UnitCount])
Thank you Phil! That worked exactly as I was hoping and expecting it to.
I appreciate your time to assist me here and thank you for the sample .pbix file as well.
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |