# Box and Whisker - Error with NULL values

**URL:** <https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034>\
**Category:** Ignition\
**Created:** [March 3, 2021, 11:47am UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034 "2021-03-03T11:47:22Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 11:47am UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/1 "2021-03-03T11:47:22Z")

</div>

Dear Fellows,

We encounter a problem when starting a Box and Whisker plot, Namely;

Error setting Box and Whisker data. Data contains NULL values.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da6d5e7e83b2fc06d6c7491e8b2ceb474b8ebaef.png)

The problems is that our data contains no NULL values.

The Query being used ls the following:

SELECT \*

FROM  
(SELECT Cavity,  
round(Label\_back,1) AS Label\_back, Limitmin\_LB, Limitmax\_LB FROM “3DData”  
) AS RawData

Where Label\_back is not null

Does anybody has a clue for us to solve this anoying error

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 3, 2021, 1:36pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/2 "2021-03-03T13:36:02Z")

</div>

Why are you using a sub query here?

```auto
SELECT Cavity, round(Label_back,1) AS Label_back, Limitmin_LB,Limitmax_LB FROM 3DData

```

Will return exactly the same set.

Also, I don’t believe that the Table Name should be in quotes.

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 2:05pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/3 "2021-03-03T14:05:18Z")

</div>

You are right about the subquery which is not nessassary but i wanted to be sure that there are no NULL values in the table I provide to the Box Whisker. The table name needs to be in double quotes…

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 3, 2021, 2:23pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/4 "2021-03-03T14:23:10Z")

</div>

> [@onno.looij](#):
>
> i wanted to be sure that there are no NULL values

Then do this:

```auto
SELECT Cavity, round(Label_back,1) AS Label_back, Limitmin_LB,Limitmax_LB 
FROM "3DData"
WHERE Label_back IS NOT NULL

```

What DB are you using?

If you must use the double quotes, then the table was created with a quoted identifier, in which case you must insure the case sensitivity is correct. Does the table name "3DData" match the table name exactly and for case?

If you can avoid using quoted identifiers I would recommend it. It is generally not best practice to use them and some tools may not support their use. Use unquoted identifiers and everyone's life will be easier.

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 2:28pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/5 "2021-03-03T14:28:09Z")

</div>

Without the Quotes I get the following error:

Error running query: SELECT \* FROM 3DData Incorrect syntax near ‘3’.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/abbdc1cf0d6b9eb4e562ee5f78cb7b1c2bbbe20d.png)

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 2:34pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/6 "2021-03-03T14:34:50Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da6d5e7e83b2fc06d6c7491e8b2ceb474b8ebaef.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 3, 2021, 2:41pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/7 "2021-03-03T14:41:36Z")

</div>

> [@onno.looij](#):
>
> Without the Quotes I get the following error:

Not surprising, table names should not start with a decimal number, so when the table was created it was undoubtedly created as a quoted identifier.

Are you certain there are no NULL values in the table?

Have you ran the following query in the Query Browser to see if it returns rows:

```auto
SELECT Cavity, round(Label_back,1) AS Label_back, Limitmin_LB,Limitmax_LB 
FROM "3DData"
WHERE Label_back IS NULL

```

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 3:05pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/8 "2021-03-03T15:05:02Z")

</div>

Yes I have and there are no Null Values:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/248820c6e2538956031a6cf688a9606ef30e40c8.png)

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 3:16pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/9 "2021-03-03T15:16:21Z")

</div>

Where as the following query:

SELECT Cavity, round(Label\_back,1) AS Label\_back, Limitmin\_LB,Limitmax\_LB  
FROM “3DData”  
WHERE Label\_back IS not NULL

delivers:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/1/811b870ea9df4d053de269ebcf4804e6790e3d6a.png)

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 3:17pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/10 "2021-03-03T15:17:38Z")

</div>

It seams like an annoying failure of ignition working with the Box plot

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 3, 2021, 3:30pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/11 "2021-03-03T15:30:40Z")

</div>

Your query checks for NULL in Label\_back, but a null value in Limitmin\_LB or Limitmax\_LB can also cause this error. I’d try changing your WHERE clause in the query browser to

`WHERE Label_back IS NULL or Limitmin_LM IS NULL or Limitmax_LB IS NULL`

to see where the bad data is.

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 3:38pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/12 "2021-03-03T15:38:42Z")

</div>

> [@KathyApplebaum](#):
>
> WHERE Label\_back IS NULL or Limitmin\_LM IS NULL or Limitmax\_LB IS NULL

That Delivers also no NULL values:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/6/e659136e170561ea5756e139652332e064e9912f.png)

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 3, 2021, 3:45pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/13 "2021-03-03T15:45:27Z")

</div>

I really think it’s a bug in Ignition

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [March 3, 2021, 3:52pm UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/14 "2021-03-03T15:52:37Z")

</div>

In that case, can you file a support ticket? I’ve looked at the code and I don’t see any way this error can come up without a NULL value somewhere in your data (I missed Cavity in your query – hopefully there are no NULLs there). Because I can’t see a way this can happen, I have no idea how to replicate the issue. If you file a ticket with support they can work with you to figure out how this is happening and we can fix it.

---

<div class="post-metadata">

**Author:** ![onno.looij](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onno.looij](https://forum.inductiveautomation.com/u/onno.looij)\
**Post date:** [March 4, 2021, 8:15am UTC](https://forum.inductiveautomation.com/t/box-and-whisker-error-with-null-values/44034/15 "2021-03-04T08:15:14Z")

</div>

Hi Kathy i have made a simple Memory tag in an empty project and opened a Box Whisker plot but it results in exactly the same failure. Is it possible for you to check if the failure also exists in the last version of Ignition?
