# How to traverse column wise

**URL:** <https://community.automationedge.com/t/how-to-traverse-column-wise/3210>\
**Category:** Get Help & Discuss\
**Created:** [April 28, 2021, 5:40am UTC](https://community.automationedge.com/t/how-to-traverse-column-wise/3210 "2021-04-28T05:40:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubhamautomation](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/shubhamautomation/32/604_2.png) [@Shubhamautomation](https://community.automationedge.com/u/Shubhamautomation)\
**Post date:** [April 28, 2021, 5:40am UTC](https://community.automationedge.com/t/how-to-traverse-column-wise/3210/1 "2021-04-28T05:40:33Z")

</div>

Hello  
I want to traverse columns wise. How can I do that.  
Example  
Empid. Emasalary

1. 

```
     100000

```

2. 

```
     200000

```

3. 

```
     300000

```

Sum of salary = 600000

How can I do this in JavaScript without using groupby

---

<div class="post-metadata">

**Author:** ![Imran\_Bhole](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Imran\_Bhole](https://community.automationedge.com/u/Imran_Bhole)\
**Post date:** [April 29, 2021, 8:19pm UTC](https://community.automationedge.com/t/how-to-traverse-column-wise/3210/2 "2021-04-29T20:19:05Z")

</div>

Hi Shubham,

if (getProcessCount(“r”) == 1) {  
var lastCredit = 0;  
}  
lastCredit = lastCredit + credit;

Relace credit with your column name.
