13 Replies Latest reply: Nov 14, 2014 2:54 AM by Rupas Lopes

# Help on Aggr

Hi,

Attached is the file with two table Fact and Component. A different part number in the Fact could have the same component, each component has its own High or Low value.

I will need to present the details as well as summary table, the summation of the Amount in the Summary table will have to match with that of total amount in the details table.

I guess Aggr function could help.

• ###### Re: Help on Aggr

See the sample

• ###### Re: Help on Aggr

Hi Sujeet,

I would like the changes to be made on summary table not the details table,

Regards,

Rufus

• ###### Re: Re: Help on Aggr

Check this

=Sum(Aggr(Min(High)/100 * Sum(AmountPounds),Date,MaterialID,PartNumber,ProcessName,Component))

• ###### Re: Help on Aggr

same as Santosh solution.. worked for me. Thank you!@

• ###### Re: Help on Aggr

In the detail table expression include TOTAL like:

=Min(total High)/100 * Sum(AmountPounds)

• ###### Re: Help on Aggr

Details table what I have provided is correct, Details table holds all the line items which will take account of one High value hence Min(High) will return to the value in the line item. We do not have High field in Summary hence Min(High) will return to 0.1 and then further calculation takes place.  Changes will have to be made in Summary table to match the sum in the Details table.

• ###### Re: Help on Aggr

This?

=Sum(High/100 * AmountPounds)

• ###### Re: Help on Aggr

Tresco has given a good logic it will work for you

• ###### Re: Help on Aggr
sum(aggr(Min(High)/100 * Sum(AmountPounds),MaterialID))   write above it will work
• ###### Re: Help on Aggr

Thank you Santosh, your solution worked on the data set..

• ###### Re: Help on Aggr

Solution provided by tresesco & Santosh Works on the sample data but does not work on actual data. let me add some more data and upload it. Thanks for helping on this.

• ###### Re: Re: Help on Aggr

Check my solution above works for you

• ###### Re: Help on Aggr

Thank you Santosh, your solution worked on the data set..