Hello Folks
I have a scenario similar to this
Source Target
Dept,sal Count
10,100 100
10,110 210
20,200 200
20,210 410
How to perform this.
Thanks
Aggregation By row-wise
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
Iit seems to be a interview question.
Please tell us that what you have attempted so far.
Iit seems to be a interview question.
Please tell us that what you have attempted so far.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 35
- Joined: Mon May 06, 2013 5:59 am
I believe what you need are two stage variables:
1) svCount = If (incominglink.Dept = svDept) Then (svCount + incominglink.Sal) Else incominglink.Sal
2) svDept = incominglink.Dept
They must be in that order. svDept should be initialized to "".
1) svCount = If (incominglink.Dept = svDept) Then (svCount + incominglink.Sal) Else incominglink.Sal
2) svDept = incominglink.Dept
They must be in that order. svDept should be initialized to "".
Last edited by asorrell on Wed Sep 04, 2013 1:16 pm, edited 1 time in total.
-
- Participant
- Posts: 35
- Joined: Mon May 06, 2013 5:59 am