# Table numbering column in Report

**URL:** <https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612>\
**Category:** Ignition\
**Created:** [April 5, 2018, 3:47pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612 "2018-04-05T15:47:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nruimveld](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@nruimveld](https://forum.inductiveautomation.com/u/nruimveld)\
**Post date:** [April 5, 2018, 3:47pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/1 "2018-04-05T15:47:31Z")

</div>

I have designed a report with a number column going 1, 2, 3, 4, 5, etc. I need for the report to show 1, 1, 2, 2, 3, 3 etc. I have @floor(Row/2)@ but the numbering starts at 0, instead of 1.

Any help would be greatly appreciated, thank you!

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [April 5, 2018, 4:59pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/2 "2018-04-05T16:59:55Z")

</div>

Do you want the report to show 1,1,2,2,3,3 etc in the columns or rows? you say it starts at 1 so I’m assuming rows.

---

<div class="post-metadata">

**Author:** ![nruimveld](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@nruimveld](https://forum.inductiveautomation.com/u/nruimveld)\
**Post date:** [April 5, 2018, 5:03pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/3 "2018-04-05T17:03:41Z")

</div>

Yes rows, sorry. My report, I currently have @floor(Row/2)@ which starts with 0, then goes 1,1,2,2,3,3 etc. I need for the row to start at 1. 😃

---

<div class="post-metadata">

**Author:** ![Mr.K001](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@Mr.K001](https://forum.inductiveautomation.com/u/Mr.K001)\
**Post date:** [April 5, 2018, 6:10pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/4 "2018-04-05T18:10:27Z")

</div>

you don’t want 0 to show up in your row results, why don’t you just filter that in your WHERE clause?

---

<div class="post-metadata">

**Author:** ![Stuart](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@Stuart](https://forum.inductiveautomation.com/u/Stuart)\
**Post date:** [April 5, 2018, 6:34pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/5 "2018-04-05T18:34:10Z")

</div>

When making a report, you can use @Row@ to display the row index. It is separate from the data actually being displayed. A where clause relies on the row index being stored in the database as a column, instead of being added on later.

As an example, if there was a table in the database storing car **owner** , **year** , **color** , and **style** , (with a primary key), it might look something like this when it was displayed.

```auto
+-----+--------+------+-------+------+
| 10 | Green | John | Car | 2001 |
+-----+--------+------+-------+------+
| 116 | Red | Ray | Car | 1994 |
+-----+--------+------+-------+------+
| 22 | Orange | Tim | Truck | 2016 |
+-----+--------+------+-------+------+
| 47 | Yellow | Jean | Car | 2008 |
+-----+--------+------+-------+------+

```

There is no sort of filtering in a where clause that will get the first column looking like, 1,1,2,2,3,3…

So rather than displaying the primary key in the first column, use the @row@ function from the reporting, which will make the table look like…

```auto
+---+--------+------+-------+------+
| 1 | Green | John | Car | 2001 |
+---+--------+------+-------+------+
| 2 | Red | Ray | Car | 1994 |
+---+--------+------+-------+------+
| 3 | Orange | Tim | Truck | 2016 |
+---+--------+------+-------+------+
| 4 | Yellow | Jean | Car | 2008 |
+---+--------+------+-------+------+

```

Which still isn’t what is wanted. When trying to use the floor function, the rows still start at 0, and then act in the desired way.

```auto
+---+--------+------+-------+------+
| 0 | Green | John | Car | 2001 |
+---+--------+------+-------+------+
| 1 | Red | Ray | Car | 1994 |
+---+--------+------+-------+------+
| 1 | Orange | Tim | Truck | 2016 |
+---+--------+------+-------+------+
| 2 | Yellow | Jean | Car | 2008 |
+---+--------+------+-------+------+

```

The question is… how to remove that 0 index, and start at 1 instead. Keeping the table data the same.

---

<div class="post-metadata">

**Author:** ![Stuart](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@Stuart](https://forum.inductiveautomation.com/u/Stuart)\
**Post date:** [April 5, 2018, 6:37pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/6 "2018-04-05T18:37:39Z")

</div>

Use the [`ceil()`](https://docs.inductiveautomation.com/display/DOC79/ceil) function.

> @ceil(Row/2)@

should work

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 5, 2018, 6:38pm UTC](https://forum.inductiveautomation.com/t/table-numbering-column-in-report/17612/7 "2018-04-05T18:38:00Z")

</div>

try:

```auto
@floor((Row+1)/2)@

```
