Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Any help with this expression:
SUM(aggr(IF(floor([completed_date.autoCalendar.Date])>=num(today())-30 and floor([completed_date.autoCalendar.Date])<= num(today()),[completed_date.autoCalendar.Date],null()), SUM(aggr(sum({$<order_type={'sales'}>}distinct quantity), order_product_id))))
Basically trying to apply a rolling date to a measure. See an error?
The expression does contain an error, but I still do not understand what you want to achieve
Trying to create a measure that will sum order sales if they fall within the last 30 days.
May be this:
=SUM(Aggr(Sum(Distinct {$<Order_type={'sales'}, [completed_date.autoCalendar.Date] = {">=$(=Date(max([completed_date.autoCalendar.Date])-30))"}>}Quantity), order_product_id))))
try this:
=SUM(Aggr(Sum(Distinct {$<Order_type={'sales'}, [completed_date.autoCalendar.Date] = {">=$(=Date(max([completed_date.autoCalendar.Date])-30, 'DD/MM/YYYY'))"}>}Quantity), order_product_id))))