Forum Discussion
Anonymous
2 years agoNot applicable
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...
- 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
BA_Pete
Super User
2 years agoHi 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
- Anonymous2 years agoNot applicable
Thank you so much, the only think is that, you have to put the month in the center.
<=#date(2024,02,01).
I really appreciate your help¡¡¡