Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

avgerage per day over a period of time

I have a table with dates and number of employees per date, the number of employees varies from day to day.

Now. i want to have tha average number of employees per day over the chosen period of time (week, month Year etc).

I need that number to use in another expression. Please help.

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try adding departement dimension to the aggr:

avg( aggr( count(distinct EMPLOYEES), DEPARTMENT, DATE))

View solution in original post

12 Replies
swuehl
MVP
MVP

Hm,

maybe

avg( aggr( count(EMPLOYEES), DATE))

?

Stefan

Anonymous
Not applicable
Author

already tried and i got nothing

SunilChauhan
Champion
Champion

in dimension  take date

and in expression

avg( aggr( count(distinct EMPLOYEES), DATE))

Sunil Chauhan
Anonymous
Not applicable
Author

problem is that i have to have teams for the employees in the dimension so Date is not an option.

So.. is it imposible "thanks" to this?

SunilChauhan
Champion
Champion

can we have any sample file

Sunil Chauhan
Anonymous
Not applicable
Author

sorry. i can't. maybe i can create some smaller version with less no releaving data but that'll take a while and i don't have time right now.

I don't get why the aggr expression doesn't work it should! if a make another chart using date as dimension and the count each employee everything looks fine. why can't i just sum those up and divide with the number of dates?

swuehl
MVP
MVP

Ah, you want to use the expression in an table chart with dimension DATE, right?

Then maybe like:

sum(total EMPLOYEES) / count( TOTAL DATE)

edit: Should be count(total ...) / count (total ...)  and not sure if this is giving the right answer, no, sorry. But maybe you could just explain a little more what dimensions and expression do you use and how your data table looks like?

l

Anonymous
Not applicable
Author

no. as i said ealier i must have employee teams as dimension in my table and the number i got from the average counting thing i'm going to use to calculate another thing with. so this is "just" a piece in the puzzle.

Anonymous
Not applicable
Author

This one worked! Thanks alot! Don't know why it didn't work before. And it actually works when i have department as dimenasion. But. Some departments gets a dash instead of a number. do not know why that is. and if i chose one of the dimensions so only one i displayed in the table i get another result than when all the departments are represented.. i find that strange...