mayool
mayool

Reputation: 148

Average Order Size by customer DAX Power BI

I need to get the average order size by customer using powerbi. My data looks something like this:

Example Data

Here, C01 ordered twice. Order A consisted of 2 items and order B consisted of 1 item. C01 ordered once and only 1 item. C03 ordered 2x one item.

So the number of orders for C01 is 2; for C02 it is 1; and for C03 it is 2 aswell.

what I need is the average order size per customer.

C01 would be 1.5; C02's and C03's would be 1; And the overall average would be 3.5/3.

I need this as a meassure so I can slice it and look how the average order size changes over time.

Thanks for any help!

Upvotes: 0

Views: 1187

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40224

I think this should be as simple as

Avg Items = DIVIDE ( COUNT ( Table1[Order ID] ), DISTINCTCOUNT ( Table1[Customer ID] ) )

Upvotes: 1

Related Questions