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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Average of distinct orders

It's frustrating that it's so complicated to find such a simple answer.  

 

I have a table of unique customers and their orders  (can of course be more than one order (with multiple lines), per customer.  

 

I have this filter by a customer, and I simply want to find the average value of the unique orders in this list.  Ideally not including zero dollar value.   So, in this case, summing up the three orders below and dividing by the distinct count of orders (orders that are not zero value).   

 

Any help is appreciated!

 

texmexdragon_0-1636154847541.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ok, just found the solution: 

 

Average Order Values = AVERAGEX(VALUES(SalesOrdersALL[Order Number]), [Total Sales])

Calculate Average Per Customer Transaction Using DAX In Power BI - Enterprise DNA



View solution in original post

5 REPLIES 5
amiller5
Helper II
Helper II

I have a dataset that has 2 years of data by accounts. I want to find the Avg. of the Distinct account names for each year. I have distinct count of account names but because account names is not a value I cannot figure out how to find the average?

amiller5_0-1652997776295.png

 

Hi,

Try this measure

Measure = averagex(values(Calendar[date]),[your measure])

Ensure that you drag Year and Month name from the Calendar Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

So I used the formula above but this is what is showing. The Avg of the number displayed in the table should be 89.8. I have same filters applied. I only want it to show the average of what is displayed in the table. Would that be a different measure?

My measure is:
Avg Account = AVERAGEX(VALUES('Service 1'[Closed Date].[Year]),[Distinct count of Account name])

amiller5_0-1655416533237.png

 

Anonymous
Not applicable

Ok, just found the solution: 

 

Average Order Values = AVERAGEX(VALUES(SalesOrdersALL[Order Number]), [Total Sales])

Calculate Average Per Customer Transaction Using DAX In Power BI - Enterprise DNA



Hi @Anonymous,

Thank you for sharing the DAX expression.😊 I think they may help others who has a similar requirement.
Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.