Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
puj831
Frequent Visitor

calculated column by column ID

example13.JPG

Hi all,

I am trying to create a new calculated column in PowerBI that will take the sum of volume by ID. Any suggestions?

 

Thanks!!!

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @puj831,

From your description, I thought the sum of ID=3 should be 228(43+23+24+43+31+64), right? If so, you could refer to below steps:

1.I have entered some sample data like the picture below:

m.PNG

 

2.Create a calculated column and you can see the result.

Column = CALCULATE(SUM(Table1[Volume]),FILTER('Table1','Table1'[ID]=EARLIER(Table1[ID])&&'Table1'[Ciyt]=EARLIER(Table1[Ciyt])))

 

n.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/ciybodnwcinfxnw/calculated%20column%20by%20column%20ID1.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @puj831,

could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @puj831,

From your description, I thought the sum of ID=3 should be 228(43+23+24+43+31+64), right? If so, you could refer to below steps:

1.I have entered some sample data like the picture below:

m.PNG

 

2.Create a calculated column and you can see the result.

Column = CALCULATE(SUM(Table1[Volume]),FILTER('Table1','Table1'[ID]=EARLIER(Table1[ID])&&'Table1'[Ciyt]=EARLIER(Table1[Ciyt])))

 

n.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/ciybodnwcinfxnw/calculated%20column%20by%20column%20ID1.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.