I want to calculate an average age with a count distinct in an expression, need some help . thanks?
Avg( Aggr( Count(Distinct Age), your_dimension) )
Is not working , I have a list of persons with different ages
now I want to calculate the average age of my list
Avg( Aggr( Count(Distinct AGE), ID) )
this will shows the no of distinct values and finding the avg of that distinct values not the ages
then simple use the below expression:
why do you want to use count in your expression?
avg (Agr) returns 40.24 (sum of 161 years devided by 4 ID)
I would Try something like the below
SUM(DISTINCT Age) / COUNT(DISTINCT Age)
Avg(Aggr(sum( distinct (Age)),Age))
Retrieving data ...