Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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 Person | Sold | Sales person office |
---|---|---|---|
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.
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 Person | Sold | Sales person office |
---|---|---|---|