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

Help: AVG on aggregate

Hi Expert,

May i know what should i write in order to get average of ACTUAL_MFG_TIME, when i change "Sum" to "Avg" and the figure go wrong. I have no idea what is going on.

=Sum(Aggr(if(($(e_Actwip_Day)>=$(vToggle)),Sum({<REPORT_DATE = {">=$(=Date(Today()-30))<=$(=Date(Today()-1))"},CAL_GROUP={'D'}>}ACTUAL_MFG_TIME),0), Date_DDMMM,PC_IE_REPORT_GRP))

Thanks for the help in advance.

Joycelyn

4 Replies
Gysbert_Wassenaar

Do you want a sum of averages or an average of sums? In other words should the inner sum be replaced with avg or the outer sum?


talk is cheap, supply exceeds demand
sunny_talwar

What exactly are you trying to do? Can you provide some more context?

Anonymous
Not applicable
Author

Hi Guys,

In short, i am looking for

1. an average of actual_mfg_time

2. WIthin condition of

- Last 30 days

- Calg_group='D'

- $(e_Actwip_Day)>=$(vToggle)


3. Group by

- Date_DDMMM

- PC_IE_REPORT_GRP

I am not sure how to write in term of average. Sum is working fine for me.

Thanks.

sunny_talwar

So do you have Date_DDMMM and PC_IE_REPORT_GRP as dimension or do you have more dimensions then these? If these are the only two dimensions in your chart then I would just use Avg() with all your above conditions.