Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Using Avg in a Pivot Table

I am trying to get the average age of drivers by policy number.  Using Avg([Driver Age]) gets me the same average for each policy.  Using the aggr function,

Aggr(Avg([Driver Age]), [Policy Number]), gets the same result.  Adding Total to the expression returns null.

1 Solution

Accepted Solutions
Not applicable

Using Avg in a Pivot Table

How about sum(driver age)/count(distinct policy number)

3 Replies
aaroncouran
Contributor III

Using Avg in a Pivot Table

How about AGGR(AVG(SUM([Driver Age])),[Policy Number])

Not applicable

Using Avg in a Pivot Table

How about sum(driver age)/count(distinct policy number)

qliksus
Valued Contributor

Using Avg in a Pivot Table

Where you are adding the total  are you giving

like  this  Aggr(total  Avg([Driver Age]), [Policy Number]))  or

Aggr(Avg(total  [Driver Age]), [Policy Number]))  this should not give you null

Community Browser