Skip to main content
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: 
Anonymous
Not applicable

aggr and charts

read about AGGR in the manual, two books, 3 blog posts and a few tech. briefs and still trying to understand how this scenario works.

Let's say i have a simple table with three columns:

Country     Salesperson     Sold,$

and another table:

Saleperson     SalespersonOffice

now i create a chart with Country and Salesperson as dimensions and one expression:

AVG

     (

          AGGR ( SUM([Sold,$] , SalespersonOffice)

     )

Note that i use SalepersonOffice in AGGR and the chart still works fine even though AGGR creates a virtual table by Office and Sum by office.

So can someone explain how AGGR knows, how to take that virtual table and apply it properly to my chart dimensions? does it works thanks to QV associative engine?

I have a background in database/SQL development so this still looks to me like magic

1 Solution

Accepted Solutions
Not applicable
Author

Hey Borys,

You guessed it right. its because of the associate data model, the two tables are linked through sales person and hence the result would look like this virtual table.

Country

Sales PersonSoldSales person office

View solution in original post

2 Replies
gopalopsharma
Creator
Creator

Hello Borys,

Its an interesting point you raised.

AGGR is quite similar to Group By function, but Qlikview charts automatically do a group by on dimensions.

So now the question appears where to use AGGR:

a. Create a calculated dimension and then perform aggregation
b. Perform additional aggregation based on resulting set of values (e.g. in Text box)

Most of the times expressions can be written wisely without using any AGGR but using proper dimension.

Do refer to Qlikview_11_for_Developers for more clear understanding with examples.

Not applicable
Author

Hey Borys,

You guessed it right. its because of the associate data model, the two tables are linked through sales person and hence the result would look like this virtual table.

Country

Sales PersonSoldSales person office