I'm trying to understand how to use un IF statement on a calculated ratio in the script editor. I have a table with two numeric fields/two measures, "[Pv One]" and "[Valore PV New]", and I know how to do a "flag variable" on their ratio in a pivot table (i.e. create an expression in this way -->
but I'm not be able to recreate this such of flag variable in the script editor. I thought to create first the ratio variable with a LET and then insert the IF statement within the load script of the table to create the flag variable -->
I have this error:
How should the script be modified to achieve this?
Thank you deeply