Normlizing Columns in a Line Chart

Comments

2 comments

  • Avatar
    Christian

    do you the values for field "label"? then you could try using "fields - ...".

    in general, if you have a column called, say, "foo", you can remove it by saying:

    | fields - foo

    0
    Comment actions Permalink
  • Avatar
    Statwing Engineers

    Thank you for the suggestion, Christian, I was able to remove the _smooth and _rollingstd fields before transposing the data and that gave me a usable chart.

    Unfortunately, rollingstd still seems to be giving a stddev of 0 for many of the labels, and this is causing NaNs to be mixed in with the data. 

    If possible I would like to use the actual stddev and average of the entire column rather than the rollingstd and smooth.

    This is still the closest I've come to getting the desired result, however.

    _sourceCategory="" | json auto | sort by date asc | rollingstd duration by label | smooth duration by label | ((duration - _smooth) / _rollingstd) as norm | fields - _smooth,_rollingstd | avg(norm) by batch,label,date | transpose row date,batch column label

    0
    Comment actions Permalink

Please sign in to leave a comment.