Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Aggregation to obtain basket size

Hi all,

This is my first post, though I have been visiting for a little while.

I have an issue that I hope somebody can help with and hopefully improve my understanding at the same time.

I am trying to find the frequency of basket sizes against a set of sales. I have a unique identifier for a sale as [Sales invoice] and I count the unit quantity by line item (product) as [Units Sold].

e.g.

[Sales invoice][SKU][Units Sold]
INVOICE123PRODUCT13
INVOICE123PRODUCT21
INVOICEABCPRODUCT37
INVOICE999PRODUCT24

My attempt to find the above is to use the following:

AGGR(SUM([Units Sold]), [Sales invoice])

However this results in inaccurate quantities. Where the above should show (Basket Size 4 = Frequency 2, Basket Size 7 = Frequency 1), instead it is showing inflated numbers which do not seem to match anything I can find.

Hopefully I have explained that clearly, any help would be much appreciated.

Thank you in advance.

Michael

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this as calculated dimension: =aggr(sum(total [Units Sold]),[Sales invoice])

And this expression: count(distinct SKU)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try this as calculated dimension: =aggr(sum(total [Units Sold]),[Sales invoice])

And this expression: count(distinct SKU)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

I removed "total" in your expression above as it was not present in your example and it worked!

Thank you for your assistance.

Regards,

Michael