Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All.
I have a column called week_starting which identifies the beginning of a week from an order_date.
Using the following I can find the previous week from the field week_starting. =WeekStart(week_starting,-1).
I have also put the above into a variable vPrevWeek.
I am trying to get the sum of the previous week by looking at the current week in a table (I don't want to use the function above/below in this case because I want to do something different later.
I want to be able to show in the kpi's as well the previous weeks depending on what is selected.
The below formula is not working. Do you have any suggestions on how to achieve this?
I cannot get the dates function working in an aggregation.
=Count({$< week_starting = { '$(vTestPrevWeek)' }>} order_code)
Havent tried on any data but this would replace an expression with above/below. this expression uses max(). Both Should work
if they error out, put some sample data, will try reproduce your scenario.
Both don't work. I guess there is not a way then as I have tried everything.
@MZqlik It will not work without above function as you have added week itself as dimension. Try below for previous week
=sum(aggr(above(Count(order_code)),(week_starting,(NUMERIC))))