Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Creator III
Creator III

Avg Aggr only returning first number of data set

I am using the following expression in an attempt to return the average number of orders processed per day, for the last seven days, for the specified warehouses.

Avg(Aggr(Count(DISTINCT {1<IsInLast7Days = {1},Warehouse = {'YSS','SSS'}>} SalesOrder),Date))

The actual data set from the chart looks like this:

03.20.2017-10.35.png

The chart data looks fine, and uses the following function:

Count(DISTINCT {1<IsInLast7Days = {1},Warehouse = {'YBF','SBF'},Date>} SalesOrder)

However, the reference line only picks up the first number instead of the average.

Any suggestions would be appreciated.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this:

Avg(TOTAL {1<IsInLast7Days = {1},Warehouse = {'YSS','SSS'}>} Aggr(Count(DISTINCT {1<IsInLast7Days = {1},Warehouse = {'YSS','SSS'}>} SalesOrder),Date))

View solution in original post

2 Replies
sunny_talwar

Try this:

Avg(TOTAL {1<IsInLast7Days = {1},Warehouse = {'YSS','SSS'}>} Aggr(Count(DISTINCT {1<IsInLast7Days = {1},Warehouse = {'YSS','SSS'}>} SalesOrder),Date))

mikegrattan
Creator III
Creator III
Author

Perfect.  Thanks for the quick answer.