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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Alternative for Aggr()

Hi Folks,

i have got a question, i use this expression on the User Interface:

Max(Aggr(Sum([Order Total]),[Customer Name], [Employee ID]))

and it does work well,

I want just know, how can i convert this expression within Script-area? And what kind of function can i use in Script-area instead of Aggr()

Thanks a lot in advance

beck

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Lets say you have a table called Fact with the three fields [Order Total], [Customer Name], [Employee ID]

Fact:

LOAD [Order Total],
           [Customer Name],

           [Employee ID],

           ....

FROM ....;

Now you can do this

Aggr:

LOAD [Customer Name],

           [Employee ID],

           Sum([Order Total]) as [Sum Order Total]

Resident Fact

Group By [Customer Name], [Employee ID];

Do you want to find the max also? If you do... you can just do this

Max:

LOAD Max([Sum Order Total]) as [Max Sum Order Total]

Resident Aggr;


View solution in original post

2 Replies
sunny_talwar

Lets say you have a table called Fact with the three fields [Order Total], [Customer Name], [Employee ID]

Fact:

LOAD [Order Total],
           [Customer Name],

           [Employee ID],

           ....

FROM ....;

Now you can do this

Aggr:

LOAD [Customer Name],

           [Employee ID],

           Sum([Order Total]) as [Sum Order Total]

Resident Fact

Group By [Customer Name], [Employee ID];

Do you want to find the max also? If you do... you can just do this

Max:

LOAD Max([Sum Order Total]) as [Max Sum Order Total]

Resident Aggr;


beck_bakytbek
Master
Master
Author

Sunny thanks a lot for your quick response