# Report - Cross tab -Coloring

**URL:** <https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165>\
**Category:** Ignition\
**Tags:** reporting, ignition81, perspective, database, scripting\
**Created:** [October 7, 2023, 7:35am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165 "2023-10-07T07:35:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan\_Manickam](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@saravanan\_Manickam](https://forum.inductiveautomation.com/u/saravanan_Manickam)\
**Post date:** [October 7, 2023, 7:35am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165/1 "2023-10-07T07:35:54Z")

</div>

In perspective , in report

lets consider I have 2 cross tab

1st cross tab I have a column as "tolerance" in another cross tab I have column actual.

here I need to validate it by compare it and need to differentiate by color.

I have used this expression

number2\>=10?"green":"red"

for simple table it's work but for cross table (dynamic value) it's doesn't work.  
 ![simple](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b6ac4b78cd84c51cbab74d40e36f91a3021705c6.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1cabc102451e18e241acc865279276f574aafc08.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/d/fddc98929330105d493be1bc236e8b36d8290093.png)

the 1st tolerance table is defined , the second crosstab actual (the actual will enter by the user in report I need to different the value by color indication whether it's under tolerance or above )

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 7, 2023, 8:12am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165/2 "2023-10-07T08:12:27Z")

</div>

1. What do you mean by 'two cross-tables with two columns'? I see two single-column tables. Why do you not have a single table with two columns?
2. `number2>=10?"green":"red"` is not a valid Ignition expression. It would be more like,  
`if(number2 >= 10, "green", "red")`  
(Note the use of spaces for legibility.)  
Maybe you mean that you are using that line in a **script transform**. not an expression.
3. Where does the red-white-green display go? In a third column of the table or elsewhere? Is it a summary counter for in / out of tolerance? If so, what does white represent?
4. The symbol for kilogram is **kg**. Your readout is showing kelvin-grams. Capitals matter.

Please edit your original post to make it clearer and show where you are using that code. Please try to address all the points raised.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 7, 2023, 9:06am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165/3 "2023-10-07T09:06:46Z")

</div>

> [@saravanan\_Manickam](#):
>
> In perspective , in report

Which is it? **Perspective** or **Reports**? They are different. Please also capitalise your sentences and proper names such as 'Perspective', etc., to be clear.

---

<div class="post-metadata">

**Author:** ![saravanan\_Manickam](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@saravanan\_Manickam](https://forum.inductiveautomation.com/u/saravanan_Manickam)\
**Post date:** [October 7, 2023, 9:13am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165/4 "2023-10-07T09:13:05Z")

</div>

In report

reg : point number 3 " 1. Where does the red-white-green display go? In a third column of the table or elsewhere? Is it a summary counter for in / out of tolerance? If so, what does white represent?"

it falls on the same actual column

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 7, 2023, 9:23am UTC](https://forum.inductiveautomation.com/t/report-cross-tab-coloring/80165/5 "2023-10-07T09:23:54Z")

</div>

> [@saravanan\_Manickam](#):
>
> In report

You have tagged your post as Perspective (but the question has nothing to do with Perspective). This has caused confusion. I suggest that you remove that tag. Report expressions don't use normal [Expression Language](https://docs.inductiveautomation.com/display/DOC81/Expression+Language+and+Syntax).

Tips:

1. To quote another user use the `>` quotation syntax or press the ” blockquote button.

> A piece of quoted text looks like this.

1. To post code inline enclose it in ` backticks.
2. To post code blocks see, [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831)
3. For 'cm²' use Alt0178 to generate the superscript 2.
