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
lotus22
Helper III
Helper III

New Column with value of another table based

Table 1

RegionType of costCostYear
APInfrastructure15002019
APApplication5002019
APInfrastructure15002020
APApplication6002020
NAInfrastructure21002020
NAApplication18002019
NAInfrastructure24002020
NAApplication22002019

 

Table 2

YearNA SalesAP SalesIT AP CostIT NA Cost
201960000020000020004000
202065000022000021004500

 

 

I would like to bring "total" cost information in the Sales table (Table2) from Table 1. Is there an easy way to do this?

 

Thank you!

2 ACCEPTED SOLUTIONS
Nathaniel_C
Community Champion
Community Champion

Hi @lotus22 ,

Created the tables then created a relationship between the two, then created two measures.Combine 2.PNGCombine.PNG

 

Sum of IT AP Cost = CALCULATE(SUM('Table 1'[Cost]),'Table 1'[Region]= "AP")
Sum of IT NA Cost = CALCULATE(SUM('Table 1'[Cost]),'Table 1'[Region]= "NA")

 

Combine 23.PNG

 

 

 

 

 

 

 

 

 

Will get back on rest,


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Hi @lotus22 ,

% of AP = DIVIDE([Sum of IT AP Cost],SUM('Table (2)'[AP Sales]))
% of NA = DIVIDE([Sum of IT NA Cost],SUM('Table (2)'[NA Sales]) )
% of Global Sales = DIVIDE([Sum of IT AP Cost]+[Sum of IT NA Cost],SUM('Table (2)'[AP Sales])+Sum('Table (2)'[NA Sales]))

 

Combine 234.PNG


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Nathaniel_C
Community Champion
Community Champion

Hi @lotus22 ,

Created the tables then created a relationship between the two, then created two measures.Combine 2.PNGCombine.PNG

 

Sum of IT AP Cost = CALCULATE(SUM('Table 1'[Cost]),'Table 1'[Region]= "AP")
Sum of IT NA Cost = CALCULATE(SUM('Table 1'[Cost]),'Table 1'[Region]= "NA")

 

Combine 23.PNG

 

 

 

 

 

 

 

 

 

Will get back on rest,


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @lotus22 ,

% of AP = DIVIDE([Sum of IT AP Cost],SUM('Table (2)'[AP Sales]))
% of NA = DIVIDE([Sum of IT NA Cost],SUM('Table (2)'[NA Sales]) )
% of Global Sales = DIVIDE([Sum of IT AP Cost]+[Sum of IT NA Cost],SUM('Table (2)'[AP Sales])+Sum('Table (2)'[NA Sales]))

 

Combine 234.PNG


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




lotus22
Helper III
Helper III

Hi Nathan, Please see below

 

Year20192020
NA Sales600000650000
AP Sales200000220000
IT AP Cost20002100
IT NA Cost40004500
IT AP %1.00%0.95%
IT NA %0.67%0.69%
IT Global0.75%0.76%
Nathaniel_C
Community Champion
Community Champion

Hi @lotus22 ,
Would you please provide a table that shows expected results.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




lotus22
Helper III
Helper III

By the way, I am trying to calculate the percentage of IT cost to Total sales. I wasn't sure how else to capture this.

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.