
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Tags:
- expression
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding departement dimension to the aggr:
avg( aggr( count(distinct EMPLOYEES), DEPARTMENT, DATE))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hm,
maybe
avg( aggr( count(EMPLOYEES), DATE))
?
Stefan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
already tried and i got nothing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in dimension take date
and in expression
avg( aggr( count(distinct EMPLOYEES), DATE))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can we have any sample file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...

- « Previous Replies
-
- 1
- 2
- Next Replies »