Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to find out total basket value . The situation is I am trying to analyse discount codes used and total basket value.
Discount codes will apply only on some products but not on all. For example , an order contains 2 products one with discount one without discount as below. When apply filter discount code, sum of sales is giving me only item values where discount code applied. But I am trying to find out total basked value instead.
OrderNo | Item | Price | Discount code | Discount amount | value |
---|---|---|---|---|---|
1 | 123 | 10 | 10 | ||
1 | 134 | 20 | Summershop | 6 | 14 |
I have created filter on discount code ,when I select summershop code on filter total order value - sum(Value)it is giving me is 14 but I would like to see total basket value which is 24 including non discount products as well.
Can anyone help.
Thanks in advance
Hi
Try This
Aggr(NODISTINCT sum(Value),[Order No])
maybe like this
Aggr(sum(Value),OrderNo)
Hi Arul,
It is still giving me 14 only.
Hi Raman,
Same value still.
This isn't an AGGR issue per se - you're just reducing your data past the point you want to see. If you've selected the specific discount code, you've removed the non-discount row from your data. You'll have to use set analysis to get it back.
Sum({<[Discount code] = >} Value) - this will get the right value if you are not showing a detailed breakdown. If you need to show the order total in addition to each individual line, you can aggr() by OrderNo.
Do you want to override the selection on [Discount code]?
=Sum{<[Discount code]>} value)
Or select OrderNo's that contain at least one line with that code, but include all rows? Then something like:
=Sum{<OrderNo = P(), [Discount code]>} value)
if you want to ignore the filter selection maybe try this
Aggr(Sum({<[Discount code] = >} Value),OrderNo)
Hi madhuqliklondon
If I understand your requirement correctly, you are looking for something which should ignore any selections / filter in your report and provide you with sales total. In that case you can try the following:
SUM({1} VALUE)
If you need the sum per OrderNo, than please try the following.
AGGR(SUM({1} VALUE), OrderNo)
Regards
Rajiv.