Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an application showing wastage. in my chart the results are broken down by day. I also have sales on the chart so i can do a waste % of sales.
I have been asked to display weekly sales also.
Can anyone help me on expression to show weekly sales please?
it would need to disregard the specific date and look at the week instead.
My fields are:
Cal_Week = Week
Store_Date = Specific Date
SalesQuantity = Sales
Thanks
You want to show this value in the same table with dimension Store_Date, repeating the weekly value for every row with a date within the week?
Try
=aggr( sum( total<Cal_Week> SalesQuantity), Cal_Week, Store_Date)
Hope this helps,
Stefan
Hi Stefan,
Sorry it has taken me so long to respond...
That expression doesnt work for me. it shows the same value against a product for each day of the week.
Any ideas?
thanks
Chris
Chris,
so you want the weekly per product, right?
Then we need to add the e.g. ProductCode to the expression:
=aggr( sum( total<ProductCode, Cal_Week> SalesQuantity), ProductCode, Cal_Week, Store_Date)
Since you are using some more dimensions, we might also need to use the NODISTINCT qualifier:
=aggr(NODISTINCT sum( total<ProductCode, Cal_Week> SalesQuantity), ProductCode, Cal_Week, Store_Date)
Or am I misunderstanding your requirement?
Regards,
Stefan
Hi Stefan,
You are not misunderstanding anything, and the last expression works perfectly.
Thanks for your help.
Chris