BAQ grid highlighted in yellow

,

I have a working BAQ that I was enhancing and at a certain point all of the grid was highlighted in yellow and a general error message appeared. I’ve had lots of BOQ’s fail with an error message but in those cases only the grid column headings appear. Then I can go to the Analyze window to get the specific failure message(s). In the case of the yellow grid, the Analyze window states - Syntax OK.

I’ve fixed my query by changing table criteria however I was just wondering what are the specific failure conditions that caused the yellow grid and Syntax OK message.

I’ve had this happen when I hit a divide by zero error while the BAQ is processing. Since the syntax is correct, the Analyze button won’t catch it, and any data processed before the error will still be returned.

This may seem like a silly question, but how did you fix it? I am getting this when trying to calculate a percent.

In your calculated field, use a case when statement to check if the denominator in the calculation is zero. If it is, set the calculated field to some default value (100%, 0%, etc. depending on your needs) and if it isn’t zero, just do the normal percentage calculation.

case when (denominator) = 0 then 1 else (numerator)/(denominator) end
1 Like

Example of me calculating a percent

IIF(GrossTotalPrice <> 0, (GrossProfitMarginAmt / GrossTotalPrice) * 100, 0)
1 Like

You’re the best!! Thanks so much! That worked perfectly!

Thanks so much!! :slight_smile: