Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

NULL DATE CONDITIONAL COLUMN

HI, I have this table : where fecha_ultimo_ingreso Column has null values (Type=Date), I need to add a conditional Column with 3 conditions ( date < 01-01-2021, then "VIEJO", date<01-01-2022 t...
  • ryan_mayu's avatar
    4 years ago

    Anonymous 

    pls try this

    if [Date] is null or [Date] < Date.FromText("2021-01-01") then "VIEJO"
    else if [Date] < Date.FromText("2022-01-01") then "NUEVO" else "ACTUAL"

  • ryan_mayu's avatar
    ryan_mayu
    4 years ago

    you are welcome