Hi Sam,
I think the issue is that the report does not give exact numbers for search rank lost impression share for keywords with values "> 90%". If it's not giving you a number and is instead giving you a string (e.g. ">90%"), the math you are doing up front ((Math.round(row['SearchRankLostImpressionShare']*100))/100;) is going to give you "NaN". "NaN" means "Not a Number". The way javascript works, it won't complain (i.e. throw an error) if you try and do mathematic operations with things that aren't numbers. Instead it just says the result is "NaN". If "searchLostISRank" is "NaN", than the if statement you have is going to evaluate to false (NaN always evaluates to false and mathematic comparisons involving NaN always evaluate to false).
FYI, I think this column spits out "< 10%" for really low values (i.e. the column doesn't give specific data for 0-10% or 90-100%), so you can remove a lot of your math by doing something like:
if (row['SearchRankLostImpressionShare'] != '< 10%') {
// search rank lost impression share is > 10%, so do stuff
}
If you want to focus on keywords with search rank lost impression shares > 20%, you could do something like:
if (row['SearchRankLostImpressionShare'] == '> 90%' || row['SearchRankLostImpressionShare'] > 0.2) {
// search rank lost impression share is > 10%, so do stuff
}
The estimated percentage of impressions on the Search Network that your ads didn't receive due to poor Ad Rank. A percentage returned as "xx.xx%", or the special values "< 10%" or "> 90%". Not compatible with the field ClickType.
Cheers,
Alex