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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
NishPatel
Resolver II
Resolver II

Yearly Calculated Measure

Hi,

 

I have below two tables. The rate in Table A is (Yearly $ / Yearly Hours). I also have another Table B where employees have scheduled labor $'s. Cost in Table B = (Labor $ * Lookup Rate in Table A). The result i want is Sum of Cost by Employees. But it's taking Grand rate of all Years if I don't add Fiscal Year in my result. I tried calculated column in a table but because i already have another calculated column, it's giving me circular reference error. 

 

NishPatel_0-1617728699594.png

 

Thank You in Advance

 

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@NishPatel , If table A and Table B are joined on year and it 1- M reation.

 

You can create a measure like

sumx(TableB, TableB[Labour]* related(TableA[Cost]))

 

else get cost in table B using one of the four methods

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

 

and then try measure

sumx(TableB, TableB[Labour]* (TableB[Cost]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Jihwan_Kim
Super User
Super User

Hi, @NishPatel 

Please try to use the below measure.

 

Cost =
SUMX (
TableB,
TableB[Labor $]
* LOOKUPVALUE ( TableA[Rate], TableA[Fiscal Year], TableB[Fiscal Year] )
)

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

Anonymous
Not applicable

Hi @NishPatel ,

You can create a calculated column as below:

Column = 
VAR _rate =
    CALCULATE (
        MAX ( 'A'[Rate] ),
        FILTER ( 'A', 'A'[Fiscal Year] = 'B'[Fiscal Year] )
    )
RETURN
    'B'[Labor $] * _rate

yingyinr_0-1617874533850.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @NishPatel ,

You can create a calculated column as below:

Column = 
VAR _rate =
    CALCULATE (
        MAX ( 'A'[Rate] ),
        FILTER ( 'A', 'A'[Fiscal Year] = 'B'[Fiscal Year] )
    )
RETURN
    'B'[Labor $] * _rate

yingyinr_0-1617874533850.png

Best Regards

Jihwan_Kim
Super User
Super User

Hi, @NishPatel 

Please try to use the below measure.

 

Cost =
SUMX (
TableB,
TableB[Labor $]
* LOOKUPVALUE ( TableA[Rate], TableA[Fiscal Year], TableB[Fiscal Year] )
)

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

amitchandak
Super User
Super User

@NishPatel , If table A and Table B are joined on year and it 1- M reation.

 

You can create a measure like

sumx(TableB, TableB[Labour]* related(TableA[Cost]))

 

else get cost in table B using one of the four methods

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

 

and then try measure

sumx(TableB, TableB[Labour]* (TableB[Cost]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.