Link to home
Start Free TrialLog in
Avatar of Jess31
Jess31

asked on

Query / Window function ?

How do I get a column showing me the sum of Qty but only summing 1 row per Category.

Item1.xlsx
Item	Category	Qty
AAAA	A	90
AAAA	A	90
AAAA	B	10
AAAA	C	100
AAAA	C	100

Open in new window


So in the data above, it would be
Item	Category	Qty	Total
AAAA	A	90	200
AAAA	A	90	200
AAAA	B	10	200
AAAA	C	100	200
AAAA	C	100	200

Open in new window

Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Explain 'summing 1 row per Category. ' in simple terms, as with the A's and B's the data mockup does not match the 'it would be' return set.
Avatar of Jess31
Jess31

ASKER

I want to sum the Qty. But only the first (or 1, doesn't matter which) row of each Category (Since qty is already a total qty for that Category).
So 90 + 10 + 100 = 200.
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial