How to Replace Invalid Birth Dates with Median Birth Dates?

Some rows contains invalid birth dates (e.g. born in 2029).

How do I write codes using the Column Expression node to replace invalid birth dates with the median birth date?

Capture

Below codes do not work.

var invalidBirthDate = new Date("2020-01-01")

if (column("Birthdate") > invalidBirthDate){
    median(column("Birthdate"))
}

Hi,

My suggestion is to replace the invalid birth dates with the median with “Rule engine” node. The median you can find with the “Groupby” node (and use it as variable).

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.