Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using below code in my combo chart to calculate YTD Average.
Dimensions: DEPT,PRODUCTTYPE
Selection: MONTH,YEAR
aggr(RangeAvg(Above( sum({<Year={$(=Max(Year))}, MONTH>}SALES),0,RowNo())),DEPT,PRODUCTTYPE,MONTH)
/
aggr(RangeAvg(Above( sum({<Year={$(=Max(Year))}, MONTH>}VOLUME),0,RowNo())),DEPT,PRODUCTTYPE,MONTH)
Issue: Application is hanging showing green color loading button when I select MONTH.
Please help me in fine tune the expression.
Thanks in advance.
do you really need aggr ?? you already have those dimensions in the chart?
Have you tried without aggr()?
or try below
aggr(
RangeAvg(Above( sum({<Year={$(=Max(Year))}, MONTH>}SALES),0,RowNo()))
/
RangeAvg(Above( sum({<Year={$(=Max(Year))}, MONTH>}VOLUME),0,RowNo())),DEPT,PRODUCTTYPE,MONTH)
Hi vinieme12
Those two DIMENSIONS DEPT,PRODUCTTYPE are in chart. MONTH is the selection.
Shall I remove aggregate function?
Could you give updated expression?
also i think you are averaging the average here? is that exactly what you need?
Normally
RangeSum(Above( sum({<Year={$(=Max(Year))}, MONTH>}SALES),0,RowNo()))
/
RangeSum(Above( sum({<Year={$(=Max(Year))}, MONTH>}VOLUME),0,RowNo()))
have you tried after removing Aggr() ?? also are you sure you are doing the correct average? check my replies below
I want YTD average of SALES/VOLUME.
Buddy can't help you much with that , you should know what results you want.
I can only help you if the results are not as expected.
I will try and let you know.
Please find the sample data.