Use Multiple if() Functions

Compute values with N/A checks using multiple if() functions

Query

logscale
score := if(x != "N/A", then=x, else=0) +  if(y != "N/A", then=y, else=0)

Introduction

Multiple if() functions can be used in a computation (eval/assign).

Step-by-Step

  1. Starting with the source repository events.

  2. logscale
    score := if(x != "N/A", then=x, else=0) +  if(y != "N/A", then=y, else=0)

    This computation checks if fields x or y is not a number, then 0 will be used instead.

  3. Event Result set.

Summary and Results

Setting the value based on an incoming value enables determination of a score triggered by a value.