4 Replies Latest reply on Jul 29, 2018 2:44 PM by Deepak Rai

# How to do a sum of max or attr

I have data structured similarly to the table below:

Cat!   Cat2   Count

A        a1           321

A        a2           321

A        a3           321

A        a4           321

B        b1           843

B        b2           843

C        c1           754

C        c2           754

C        c3           754

C        c4           754

C        c5           754

D        d1           174

D        d2           174

That is, the value of column Count is the same for all records that share the same Cat1 (artifact of a table join on Cat1).  I can't figure out how to get a proper total of Cat1 that would be the sum of distinct values.  So in this case, the total would be 321+843+754+174. Feels like I'm missing something really obvious.

Thanks

Dmitry

• ###### 1. Re: How to do a sum of max or attr

HI Dmitry;

Use the below calculation

{fixed [Cat!] : max(Count)}

Will give max value for each line

Cat!   Cat2   Count

A        a1           321

B        b1           843

C        c1           754

D        d1           174

drag the calculated field to text so that you will get the sum of all the values

Hope this helps

Kindly mark this answer as helpful and correct so that it will help others.

If not kindly attach the sample workbook so that it will be easy to help more

BR,

NB

• ###### 2. Re: How to do a sum of max or attr

{SUM({Fixed Cat!:AVG(Count)})}

• ###### 3. Re: How to do a sum of max or attr

I did try both of these and I don't get the right totals.  So there is probably something else going on with my data that I need to figure out.  At least I know that I'm not missing something obvious.  Thanks.

• ###### 4. Re: How to do a sum of max or attr

Well then please paste workbook with fake data and what u need