LuckyLucks
asked on
return a single row per ID
Hi EEE:
I have a dataset of units being bought and/or sold. The deal ID is determined by column D and you may buy and sell units under the same deal. Column E is just some descriptive for the deal.
Original dataset
D E BS B_VAL S_VAL
d1 e1 B 200 null
d1 e1 S null 100
d2 e2 B 500 null
Evaluate if B_VAL > S_VAL given same D then return one row only but with BS as B and keep both the B_val and S_val on the same row.
d1 e1 B 200 100
d2 e2 B 500 null
I have a dataset of units being bought and/or sold. The deal ID is determined by column D and you may buy and sell units under the same deal. Column E is just some descriptive for the deal.
Original dataset
D E BS B_VAL S_VAL
d1 e1 B 200 null
d1 e1 S null 100
d2 e2 B 500 null
Evaluate if B_VAL > S_VAL given same D then return one row only but with BS as B and keep both the B_val and S_val on the same row.
d1 e1 B 200 100
d2 e2 B 500 null
Should the result of B_VAL and S_VAL a sum of the fields?
ASKER
no, just list the values
So, what should be the output in this case?
D E BS B_VAL S_VAL
d1 e1 B 200 null
d1 e1 S null 100
d1 e1 B 150 null
D E BS B_VAL S_VAL
d1 e1 B 200 null
d1 e1 S null 100
d1 e1 B 150 null
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
please provide more sample data in an excel and show what you need out of this...