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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
davidi4524
Helper III
Helper III

how to calculate between two columns from diffrent tables?

hi, i have two tables , one is a branch table wichh includ the branch name and profit target.

and another table wich inculde branche and total profit.

i whant to create a colum tahat make a "branch profit targer - total profit.

 

for example: cranch number one - the profit target is 1500

and the total profit is 2100

 

i whant to to 2100 - 1500 = 600

 

so the colum will show "600".

thanks for respondes.

david.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Medeling tab => New Table

 

Summary Table =
SUMMARIZE (
    'TotalProfit',
    'TotalProfit'[Branch Name],
    'TotalProfit'[Date],
    "Profit", CALCULATE ( SUM ( TotalProfit[Profit] ) ),
    "Target", LOOKUPVALUE (
        'Targets'[Target],
        'Targets'[Branch Name], 'TotalProfit'[Branch Name],
        'Targets'[Date], 'TotalProfit'[Date]
    )
)

 then in this new Summary Table create a column

Column = 'Summary Table'[Profit] - 'Summary Table'[Target]

 

Related Profit Final.png

View solution in original post

16 REPLIES 16

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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