Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I try to create measure that display the avg of sales where field InsertDate equal to user selection minus one month (get the values of previous month)
avg({<InsertDate=,InsertMonth=,InsertYear=,Status={'Active'},InsertDate={">=$(=MonthStart(addMonths(max(InsertDate),-1)))).
<=$(=MonthEnd(addMonths(max(InsertDate),-1)))"}>}Sales)
Could you please advise?
Thank you!!
Remove InsertDate= from the beginning of your set analysis expression and see if that fixes the issue
Avg({<InsertMonth, InsertYear, Status = {'Active'}, InsertDate = {">=$(=MonthStart(AddMonths(Max(InsertDate), -1))))
<=$(=MonthEnd(AddMonths(Max(InsertDate), -1)))"}>} Sales)