# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor III

## Finding the sum

Hi,

Please someone help me with this:

Product,Sales

A,50

B,40

B,65

A,35

C,70

I need the output in text box as B:105

because the max value of the total sales of that product.

2 Solutions

Accepted Solutions
Honored Contributor II

## Re: Finding the sum

This may be

=only({<Product={"=Sum(Sales)=Max(total AGGR(sum(Sales),Product))"}>}Product ) & ':' & Max(AGGR(sum(Sales),Product))
Learning never stops.
Valued Contributor III

## Re: Finding the sum

Hi,

Please use below Expression to get that:

FirstSortedValue(ID,-aggr(sum(Value),ID))&':'&MAx(Aggr(Sum(Value),ID))

Thanks & regards,
Arvind Patil
4 Replies
Honored Contributor II

## Re: Finding the sum

This may be

=only({<Product={"=Sum(Sales)=Max(total AGGR(sum(Sales),Product))"}>}Product ) & ':' & Max(AGGR(sum(Sales),Product))
Learning never stops.
Valued Contributor III

## Re: Finding the sum

Hi,

Please use below Expression to get that:

FirstSortedValue(ID,-aggr(sum(Value),ID))&':'&MAx(Aggr(Sum(Value),ID))

Thanks & regards,
Arvind Patil
Valued Contributor III

## Re: Finding the sum

Data:
ID,Value
A,50

B,40

B,65

A,35

C,70 ];
Exit Script;

Thanks & Regards,

Arvind Patil

Community Manager

## Re: Finding the sum

Is this for QlikView or Sense as I would like to move into the correct product forum
Sue Macaluso
Community Browser