Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a calendar module which gives me month, weekdays, etc etc..
I have another table which connects to the calendar module by date.
Now in the table, I have a field called [enrollment count], which has some data filled for every day.
I have a chart which gives me a sum of the [enrollment count] day wise: i.e. Monday, Tuesday, Wednesday, etc.. I used the expression sum([expression count])
Now instead of sum, I want an average of the [enrollment count] day wise. So if there are five sundays in a month it should take the sum of all the five values and then divide it by 5. I used the expression avg([expression count]), but the result is not correct.
Please suggest where I am going wrong.
Me again,
I think you should change above in
=sum([expression count]) / count (distinct Date)
thus summing the values per Weekday / Month / Year, but then dividing by the number of distinct dates.
Maybe like
=avg(aggr(sum([expression count]),Weekday,Month))
In a table with dimensions Weekday and Month.
Hope this helps,
Stefan
Hi Stefan,
The above expression gives me the sum of [enrollment count] on weekdays. It is not giving an average.
Any other suggestion?
Regards,
Rajiv
Ah yes, I think my expression is more useful for totals.
Have you tried a plain
=sum([expression count]) / count ([expression count])
?
In a table with dimensions Year, Month, Weekday, I think this should give you the average count per weekday in a given month.
Me again,
I think you should change above in
=sum([expression count]) / count (distinct Date)
thus summing the values per Weekday / Month / Year, but then dividing by the number of distinct dates.
Hi Stefan,
Thanks for the response, but want to understand the working..
I want to understand the difference between the three expressions:
1) avg([expression count])
2) sum([expression count]) / count ([expression count])
3) sum([expression count]) / count (distinct Date)
The 1st and the 2nd expression give the same result.
Cheers,
Rajiv
Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am
23.09.2011.
Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!
Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am
23.09.2011.
Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!
Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am
23.09.2011.
Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!
Ich werde ab 05.09.2011 nicht im Büro sein. Ich kehre zurück am
23.09.2011.
Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank!