Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon
I'm doing a data classification and I have to compare the sales of the current week and the sales of the previous week, but when doing the classification the system only brings me the current week that is the 35th week. I would like to know if there is a formula in which can bring me the week before, now this is the formula that you make in the Set Analysis
Sum ({<business_line - = {'00'}, Canal_Distri = {'WAREHOUSE SALE'}, year = {$ (= year (today (0)))}, month = {$ (= month (today (0) ))}>} amount)
thanks for your help
The formula that you have should return the sales of the current month (not sure how you are getting the only 1 week sales).
Current:
Sum ({<business_line - = {'00'}, Canal_Distri = {'WAREHOUSE SALE'},year={$(=year(today()))} Week={$(=week(today()))} amount)
Previous:
Sum ({<business_line - = {'00'}, Canal_Distri = {'WAREHOUSE SALE'},year={$(=year(today()))}, Week={$(=Week (today ())-1)} amount)
P.S. - Assuming that you have week field in your data model.
Hi Alvaro,
Create a Field Week in your data with Week(<Your Date Field>)
and add below text in your epression. This will give you previous week Sum of Sales.
Sum ({<business_line - = {'00'}, Canal_Distri = {'WAREHOUSE SALE'}, year = {$ (= year (today (0)))}, month = {$ (= month (today (0) ))}, Week = {$ (= Week (today (0))-1)}>} amount)
Hope this is what you are looking for.
Regards,
Akshaya
Good afternoon
thanks for your help, I have solved the problem, I make the mesh the calculation of the weeks of the year 2018 and then in the analysis set I make the formula.
Sum ({<business_line - = {'00'}, Canal_Distri = {'WAREHOUSE SALE'}, year = {$ (= year (today (0)))}, Week = {$ (= Week (today (0))-1)}>} amount)
thanks.
Glad its worked out. Can you please close the thread now. Thanks