Search code examples
pentahopentaho-spoonpdi

PDI: how to combien IF and ISBLANK on formula step?


In my DB table, I have a column called type and its possible values are "A", "B" or Null. If It's Null, I want to replace it to "C", otherwise no change. So here's what I did on formula step:

IF(ISBLANK([type]);"C")

However I can an error message saying: Please specify a Boolean type for field [type] as a result of formula [IF(ISBLANK([type]);"C")].

Where's the prob?


Solution

  • Two things..

    Correct formula for Null type is ISNA(), and yes you also forgot the ELSE part of the IF.

    IF(ISNA([type]);"C";[type])