Here is a sketch, maybe it helps. It should produce a data point "power" that is calculated based on "voltage", "current" and "cosphi". You would need to edit the text below to replace it with the names that your actual device uses, both for the fragment type and the data point names. Note that the assumption is that voltage, current and cosphi come together as part of one measurement.
insert into
CreateMeasurement
select
m.measurement.source as source,
current_timestamp().toDate() as time,
"marc_Power" as type,
{
"marc_Power.power.value",
Math.sqrt(3) *
getNumber(m, "marc_CurrentAndVoltageMeasurement.voltage.value") *
getNumber(m, "marc_CurrentAndVoltageMeasurement.current.value") *
getNumber(m, "marc_CurrentAndVoltageMeasurement.cosphi.value"),
"marc_Power.power.unit", "kW"
} as fragments
from
MeasurementCreated m
where
getObject(m, "marc_CurrentAndVoltageMeasurement") is not null;