Forum Discussion
rdc_green
4 years agoFrequent Visitor
Multiply 2 different columns from 2 tables using datetime as a lookup. The tables cannot be RELATED
Hi, I'm trying to multiply kWh x CO2 based on the timestamp. I have looked through various other solutions, but most of them reference the RELATED function, which doesn't seem to work for me. The...
- 4 years ago
If you cannot create a physical relationship between tables then use TREATAS function connecting both the tables and calculate a measure.
Regards
DI
v-kkf-msft
4 years agoCommunity Support
Hi rdc_green ,
Has your problem been solved? If it is solved, please mark a reply which is helpful to you.
If the problem is still not resolved, please try the following measures:
Measure =
SUM ( table1[CO2] )
* CALCULATE (
SUM ( table2[kWh] ),
KEEPFILTERS ( table2[reg_date] = MAX ( table1[Datetime] ) )
)TotalValue =
SUMX ( VALUES ( table1[Datetime] ), [Measure] )
Best Regards,
Winniz