Maybe double check that your calculations are being pointed toward columns that are number data types instead of strings? Always easier to share an example workflow with dummy data that highlights your issue.
Agreeing with @HansS and @iCFO that providing a sample dataset/workflow and a description of what you are wanting to do is more likely to help people to help you than simply supplying some code (in “some other language”).
It looks like you are trying to use Alteryx code (I’m guessing) which does not use the same scripting language as Column Expressions.
The Column Expressions node scripts are based on javascript, so you may wish to acquaint yourself with some basic javascript from a tutorial site such as this:
Also, take a look at the examples in the following forum post which may give some pointers:
Hopefully bringing that information together will help point you in the right direction.
All that being said… AI can be quite good for giving a quick-start with code conversions. For example, chatGPT suggested the following conversion, so you could give it a try with your dataset and come back with further questions if it still isn’t working.
if (
column("PO Price per PC") >= (column("Std Cost per DZ") / 12 - 1) &&
column("PO Price per PC") <= (column("Std Cost per DZ") / 12 + 1)
|| isMissing(column("Std Cost per DZ"))
) {
"Current Qtr"
} else {
""
}