Discussion board where members can get started with QlikView.
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
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?
=aggr( sum( total<Cal_Week> SalesQuantity), Cal_Week, Store_Date)
Hope this helps,
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.
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?
You are not misunderstanding anything, and the last expression works perfectly.
Thanks for your help.