Skip to main content
May 14, 2019 6:41 AM UTC
Solved

fill null values with next not null value in infotable

I have a infotable with some columns (timestamp, DT, TEMC, etc;) and values are some null and double.

I need to replace the null with previous value. If previous value is also null, then I need to replace with next not null value. Please help me out.

Find attachment for my infotable

 

    PaiChungAnswer
    May 14, 2019 8:58 PM UTC

    Please keep in mind that null is different from undefined

    You either just loop through it and check each value and replace it,

    Or you could use derive fields to generate a new column

    if they are null you can use the following in the expression

    columnname ? columnname : "nullreplacementvalue"

     but that can't get you previous value unfortunately.

    2 replies

    PaiChungAnswer
    May 14, 2019 8:58 PM UTC

    Please keep in mind that null is different from undefined

    You either just loop through it and check each value and replace it,

    Or you could use derive fields to generate a new column

    if they are null you can use the following in the expression

    columnname ? columnname : "nullreplacementvalue"

     but that can't get you previous value unfortunately.

    May 28, 2019 12:15 PM UTC

    Hi effpt3,

     

    If PaiChung answered you question, kindly mark the post as accepted solution, this will benefit other community members.

     

    Best,

    abarki