May 07 2019 12:42 AM
Hello everyone,
I have a table of product from a client. I need to calculate the average total price of products as well as average count of products
I used this dax expression for average total
```
Average Total of Price =
CALCULATE(
AVERAGE(wedding_data[Price])
)
Here is the sample of the table
[Buyer], John,Francis, Charles, John, Francis
[Wedding Date], 6/1/2019, 1/2/2019, 9/1/2019, 6/1/2019, 7/7/2019
[Location], AK, NY, CO,AK, TX
[Product_Name],iPad, Jewel, Books, Jewel, Shoe
[Price], $5, $7.5, $6.12, $10, $21
Using the DAX above, one will obtain the average total price
Now I need to do the average count of product, with the right DAX,
However, I am not sure what expression to use for average count for each product.
I am suppose to get a value that if I multiply by the number of items, I will give the total sum of items.
May 07 2019 03:12 AM
@AKP_1 , for Average price it's enough
Average Total of Price := AVERAGE(wedding_data[Price])
Average count - it's average per buyer, per date or what? If per buyer that could be
Average Count:=COUNT(wedding_data[Product])/DISTINCTCOUNT(wedding_data[Buyer])