Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem with set analysis with value from a field.

Hi,

I need to do a set analysis that sum the total of each customer for every row in a table.

Example:

DB:

CustomerID            Year             LineSalesAmount

A1                           2014                        100

A1                           2015                        300

A2                           2012                        500

A2                           2014                        700

A2                           2015                        300

I need to have:

CustomerID             Year             LineSalesAmount       Total for each customer

A1                           2014                        100                                  400

A1                           2015                        300                                  400

A2                           2012                        500                                1500

A2                           2014                        700                                1500

A2                           2015                        300                                1500

I try with set analysis and I read many post of community but I dont find how I can do this.

(I need the column 'Total for each customer ' to order the customers for their total turnover).

Please can you help me?

Thank you bery much.

Best regards.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

SUM(TOTAL <CustomerID> LineSalesAmount)

View solution in original post

6 Replies
MK_QSL
MVP
MVP

SUM(TOTAL <CustomerID> LineSalesAmount)

Anonymous
Not applicable
Author

Thank you very much!

There was so simple...!

anbu1984
Master III
Master III

Aggr(Sum(LineSalesAmount),CustomerID)

awhitfield
Partner - Champion
Partner - Champion

HI Giuseppe,

you could also try a pivot table then you don't get the customer total duplicated

Andy

See Attached

Anonymous
Not applicable
Author

Thank you Andrew!

Anonymous
Not applicable
Author

Tank you!