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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Fali324
Helper II
Helper II

creating a calculated column based on another column

Hi,

 

I am trying to create a calculated column to sum another column. Here is some example data of what I am trying to produce:

 

Project NameProductCostTotal Project CostPercentage
Project Acar£1,000.00£7,000.0014%
Project Abus£1,000.00£7,000.0014%
Project Ahat£1,000.00£7,000.0014%
Project Aglass£1,000.00£7,000.0014%
Project Acup£1,000.00£7,000.0014%
Project Acar£1,000.00£7,000.0014%
Project Abus£1,000.00£7,000.0014%
Project Bhat£2,000.00£8,000.0025%
Project Bcar£2,000.00£8,000.0025%
Project Bbus£2,000.00£8,000.0025%
Project Bhat£2,000.00£8,000.0025%

 

I had the data in red text, I am trying to calculate total project cost so I can then work out the percentage. what is the best way to do this. Any help is much appreciated.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Fali324 

For total project you can use dax :

Total_project_Rita = CALCULATE(sum('Table'[Cost]),ALLEXCEPT('Table','Table'[Project Name]))

 

for percent
%_Rita = [Cost]/[Total_project_Rita]
 
PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Fali324 

For total project you can use dax :

Total_project_Rita = CALCULATE(sum('Table'[Cost]),ALLEXCEPT('Table','Table'[Project Name]))

 

for percent
%_Rita = [Cost]/[Total_project_Rita]
 
PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.