Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

RECREATE EXCEL FORMULA

I need to recreate an excel formula in power bi and make this a new column, but not with DAX, if I'm not mistaken I need to do it with the M language, but I don't know how to do it THIS IS MY FORMUL...
  • BA_Pete's avatar
    2 years ago

    Hi Anonymous ,

     

    There's a number of syntax issues with your M code.

    Assuming that your [#"FECHA"] column is a Date data type, try something like this instead:

     

    if [PORT.CARRIER DESC] = "SomeName" and [#"FECHA"] <= #date(2024, 01, 02) then "REN"
    else "ACT"

     

     

    Pete