Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Not sure which is the best to use, have tried both, but have not been able to correctly create expression. I want to create a measure that will find average of last 30 days sales. This measure will be used in a table, so when the measure is used it should show different values each day, since the 30 days shift daily. Any help to create this expression? I think it should be one of either avg or rangeavg, but whatever will calculate this value will work. Thank you in advance for help.
Try
Avg({<Date = {">=$(=Date(Max(Date))-30)))"}>}Sales)
Avg({<Date = {">=$(=Date(Max([completed_date.autoCalendar.Date]))-30)))"}>}order_total)
Updated formula a little, but do not get correct value, closer though. This expression seems to provide a per order average for the day. I would like the average of total sales for day for days within last 30 days. Tried altering it to be a bit more complex as well, but expression was not calculating anything. Any edit to this expression that may help?
Is date a dimension in your chart? if so it's not possible here to use Date both as a dimension and in the set modifier in the expression.
you may need an as of table or a complex aggr.