I have an SQL query to return some values, like: Avarege, warning, disaster, high. sometimes he returns all but sometimes he returns two of them, however I need to make a manipulation going through them all. I need a condition if it doesn't exist or doesn't create a defalt. Follows both the error and the expression
| staticColumn name="sum" value={ply expression={math "round(mean(total) - sum(seg))"} | getCell "value"}
| mapColumn name="segundo"
expression={if {getCell "severidade" | eq "Normalized"} then={math "sum"} else={math "seg"}}
| mapColumn name="segundopor" expression={math "round(segundo/total*100,3)"}
| staticColumn name="average" value={getCell column="segundopor" row=0}
| staticColumn name="disaster" value={getCell column="segundopor" row=1}
| staticColumn name="high" value={getCell column="segundopor" row=2 }
| staticColumn name="normalized" value={getCell column="segundopor" row=3}
| staticColumn name="warning" value={getCell column="segundopor" row=4}
| filterrows {getCell "severidade" | eq "Normalized"}