Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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

View solution in original post

3 Replies
Anonymous
Not applicable
Author

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

Not applicable
Author

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

qliksus
Specialist II
Specialist II

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