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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Shelley
Continued Contributor
Continued Contributor

How to calculate across two tables

I'm sure I'm missing something simple, but I cannot figure this out.

 

I have three tables linked together via a link table. Two of the tables have data in them that I need for a formula. One table contains ticket transactions with hours per ticket. The other table, linked by Cust ID thru a Link table, contains the Customer and the $ value per hour. I want to take the hours on each ticket (record) and multiply them by the $ value per the type of savings column in the customer table.

 

How do I do this?

 

I tried to add this column in the ticket table:

Improved HP ($) =
'Ticket'[Improved HP (Hrs) column] *
LOOKUPVALUE('ROI Table'[HP $ Value Multiplier],'ROI Table'[Cust ID], 'Ticket'[Ship-To-ID])

 

Which worked at first, but I actually have three different categories, each with a different $ value column by customer for which I need the same calculation. As I mentioned, the first one worked, but when I tried to create the others, I received a circular reference error and now even the first one doesn't work.

 

I then tried to go to the Customer table, which should contain one record per customer and then tried this:

calculated column =
    'ROI Table'[HP $ Value Multiplier] * CALCULATE ( SUM ( 'Ticket'[Improved HP (Hrs)] ),
        ALLEXCEPT ( 'Ticket', Ticket[Ship-To-ID], Ticket[Category ID]) )

But I don't know what this is doing. It comes up with a high odd looking number, like perhaps it's across the entire table, for all rows in the visual.

 

Any ideas?

 

Thanks.

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi Shelley,

 

You'd better share your sample table, you can create fake data if your data is private, it's hard to figure out the solution without data.

 

Thanks,

Angelia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors