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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
brettmeyers
Advocate I
Advocate I

Create a caluculation between two tables

I am a NEWBIE to Power BI and DAX. Any help is greatly appreciated!

 

I have 2 tables (screenshots attached).

 

Table 1: TKHours

Table2: PPEAmounts

 

What I am trying to acheive is:

  • PPEAmounts[Amount] / TKHours[Hours]

Thank you in advance for any feedback,

Brett

 

 

2016-08-29 (1).png2016-08-29.png

2 ACCEPTED SOLUTIONS
ankitpatira
Community Champion
Community Champion

@brettmeyers You need to create relationship between two tables using common field such as Jobnumber in your case. Once relation is there you can simply create calculated column to get value for each row or create a measure to get difference using sum(PPEAmounts[Amount]) / sum(TKHours[Hours]).

View solution in original post

Anonymous
Not applicable

Hi brettmeyers,

 

Ankipatira ‘s point seems well, you could also use LOOKUPVALUE function to create a measure to achieve your requirement.

 

I find these tables all have a jobnumber column, I use this column as the search column: (Since I can’t find a same jobNumber between two tables, I have modified the jobnumber)

 

Dax:

Measure = SUM(PPEAmounts[Amount])/LOOKUPVALUE(TKHours[Hours],TKHours[JobNumber],VALUES(PPEAmounts[JobNumber]))

 

Result: (I added a column to store and display the measure)

Capture2.PNG 

 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi brettmeyers,

 

Ankipatira ‘s point seems well, you could also use LOOKUPVALUE function to create a measure to achieve your requirement.

 

I find these tables all have a jobnumber column, I use this column as the search column: (Since I can’t find a same jobNumber between two tables, I have modified the jobnumber)

 

Dax:

Measure = SUM(PPEAmounts[Amount])/LOOKUPVALUE(TKHours[Hours],TKHours[JobNumber],VALUES(PPEAmounts[JobNumber]))

 

Result: (I added a column to store and display the measure)

Capture2.PNG 

 

Regards,

Xiaoxin Sheng

ankitpatira
Community Champion
Community Champion

@brettmeyers You need to create relationship between two tables using common field such as Jobnumber in your case. Once relation is there you can simply create calculated column to get value for each row or create a measure to get difference using sum(PPEAmounts[Amount]) / sum(TKHours[Hours]).

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.