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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Alirezam
Helper V
Helper V

calculate a coloumn based on variable in other table

Hi experts,

I need your help.

In table 1 I have "date" and "HDD"

In table 2, I have "date", "Energy", "ratio"

I want to add a column to table 2, calculating "Energy"="HDD"x"ratio"

This shold be only for the "HDD' that its "date" in table 1 matches to that of Table 2. (e.g. for Jan 2018 I must get 10x1.5=15

 

Table1

date                HDD

Jan 2018          10

Mar 2018         20

 

Table 2

date              Energy       ratio

Feb 2018         ?               1

Jan 2018        ?               1.5

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Alirezam 

Energy = LOOKUPVALUE(Table1[HDD],Table1[Date],Table2[Date])*Table2[Ratio]

Try above calculated column this will work in case there is only one record exist for each date of table 2 in table 1 date column

View solution in original post

Alirezam
Helper V
Helper V

I do appreciate your reply. It helped me a lot. Just a quick one, if in the Table 1 I have more than 1 value for each date and want to find it by condition (e.g. if the "date" >Nov. 2019) how should I modify the command you sent through? Many thankx.

View solution in original post

2 REPLIES 2
Alirezam
Helper V
Helper V

I do appreciate your reply. It helped me a lot. Just a quick one, if in the Table 1 I have more than 1 value for each date and want to find it by condition (e.g. if the "date" >Nov. 2019) how should I modify the command you sent through? Many thankx.

Anonymous
Not applicable

@Alirezam 

Energy = LOOKUPVALUE(Table1[HDD],Table1[Date],Table2[Date])*Table2[Ratio]

Try above calculated column this will work in case there is only one record exist for each date of table 2 in table 1 date column

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.