Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
cwitman1
Contributor III
Contributor III

Combining Values to Unique User

Is there a way I can combine values to for a Unique User.

Ex. Table of  User by Total MB Downloaded

What I have:

UserDomainMB_Downloaded
Chris WGoogle100
Bob FYahoo50
Chris WAol25
Tom JAol25
Bob FAol10
Tom JYahoo5

What I want:

UserDomainMB_Downloaded
Chris WGoogle, Aol125
Bob F Yahoo, Aol60
Tom JAol, Yahoo30

Is there a way I can do this in Data load? or anyway to get this?

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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

];

Capture.PNG

View solution in original post

4 Replies
Anonymous
Not applicable

Hello Chris

Try this as expresion:

=aggr(sum(MB_Downloaded),User)

Regards

Jacek.

sunny_talwar
MVP
MVP

Sure, try this while loading....

LOAD User,

     Concat(DISTINCT Domain, ', ') as Domain,

     Sum(MB_Downloaded) as MB_Downloaded

FROM....

Group By User;

sunny_talwar
MVP
MVP

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

];

Capture.PNG

Anonymous
Not applicable

Here you go.