Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

1 Solution

Accepted Solutions
Not applicable
Author

sum(aggr(Min(High)/100 * Sum(AmountPounds),MaterialID))   write above it will work

View solution in original post

13 Replies
sujeetsingh
Master III
Master III

See the sample

tresesco
MVP
MVP

In the detail table expression include TOTAL like:

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

Not applicable
Author

Hi Sujeet,

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

Regards,

Rufus

Not applicable
Author

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.

tresesco
MVP
MVP

This?

=Sum(High/100 * AmountPounds)

anbu1984
Master III
Master III

Check this

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

sujeetsingh
Master III
Master III

Tresco has given a good logic it will work for you

Not applicable
Author

sum(aggr(Min(High)/100 * Sum(AmountPounds),MaterialID))   write above it will work
Not applicable
Author

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.