Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way I can combine values to for a Unique User.
Ex. Table of User by Total MB Downloaded
What I have:
User | Domain | MB_Downloaded |
---|---|---|
Chris W | 100 | |
Bob F | Yahoo | 50 |
Chris W | Aol | 25 |
Tom J | Aol | 25 |
Bob F | Aol | 10 |
Tom J | Yahoo | 5 |
What I want:
User | Domain | MB_Downloaded |
---|---|---|
Chris W | Google, Aol | 125 |
Bob F | Yahoo, Aol | 60 |
Tom J | Aol, Yahoo | 30 |
Is there a way I can do this in Data load? or anyway to get this?
Here is a sample script using Inline load
Table:
LOAD User,
Concat(DISTINCT Domain, ', ', RecNo()) as Domain,
Sum(MB_Downloaded) as MB_Downloaded
Group By User;
LOAD * INLINE [
User, Domain, MB_Downloaded
Chris W, Google, 100
Bob F, Yahoo, 50
Chris W, Aol, 25
Tom J, Aol, 25
Bob F, Aol, 10
Tom J, Yahoo, 5
];
Hello Chris
Try this as expresion:
=aggr(sum(MB_Downloaded),User)
Regards
Jacek.
Sure, try this while loading....
LOAD User,
Concat(DISTINCT Domain, ', ') as Domain,
Sum(MB_Downloaded) as MB_Downloaded
FROM....
Group By User;
Here is a sample script using Inline load
Table:
LOAD User,
Concat(DISTINCT Domain, ', ', RecNo()) as Domain,
Sum(MB_Downloaded) as MB_Downloaded
Group By User;
LOAD * INLINE [
User, Domain, MB_Downloaded
Chris W, Google, 100
Bob F, Yahoo, 50
Chris W, Aol, 25
Tom J, Aol, 25
Bob F, Aol, 10
Tom J, Yahoo, 5
];
Here you go.