Adding logic to transform calculations

Hi All,
Is there and option for adding logic to a transform calculation, for example i have a table

|  Time   | A |   B   |           Logic             |
+---------+---+-------+-----------------------------+
| Sample1 | 1 |  0.25 | IF (A==1) AND (B > 0.5)     |
| Sample2 | 1 |  0.35 | IF (A==1) AND (B > 0.5)     |
| Sample3 | 2 | 35.50 | IF (A==1) AND (B > 0.5)     |
| Sample4 | 1 | 20.00 | IF (A==1) AND (B > 0.5)     |
| Sample5 | 2 | 11.00 | IF (A==1) AND (B > 0.5)     |
+---------+---+-------+-----------------------------+```


the column logic should be the result of the logic.
Thanks

I don’t think so, as it wouldn’t be too safe I think :sweat_smile:

For Prometheus Database you can add queries and add expressions. In These expressions you can do math.

Then you can calculate based on the queries.

$A is query A and so on. Maybe this helps?
Fürther the transformation allows to calculate fields based on other fields. You May try this, too with “math” ?

Hi Alexander, I am using a combinations of datasources, I was able to do it with math but I was hoping to have the logic more clean.