Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
kishorj1982
Creator II
Creator II

AGGR Function

Hi All,

I need to show unit cost for max(DtDate) for combination of  branch plant and part number.

I used below formulae but no luck.

sum({<DtDate={'$(=max(aggr(max(DtDate),BranchPlant,PartNumber)))'}>} UnitCost)

Thanks

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

May be create a new field in the script like this

AutoNumber(BranchPlant&PartNumber) as NewField

and then try this

Sum({<NewField = {"=DtDate = Max(TOTAL <NewField> Aggr(DtDate, NewField, DtDate))"}>}UnitCost)

tresB
Champion III
Champion III

May be using a straight table:

Dim1: BranchPlant

Dim2: PartNumber

Exp: FirstSortedValue( Aggr(Sum(UnitCost),DtDate), -DtDate)