Skip to main content
1-Visitor
May 14, 2019
Solved

fill null values with next not null value in infotable

  • May 14, 2019
  • 2 replies
  • 1881 views

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

 

    Best answer by PaiChung

    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

    PaiChung22-Sapphire IAnswer
    22-Sapphire I
    May 14, 2019

    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.

    5-Regular Member
    May 28, 2019

    Hi effpt3,

     

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

     

    Best,

    abarki