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 Column Parent Total

I am struggling with a DAX formula to calculate the average of the column parent. I would appreciate your help a lot on this.

 

I am presenting a simiplified example version below of, let's say, a retail store active in a few cities offering products from two departments: Bicycles and paintings.

 

I am trying to calculate an average Sales figure on employee level per City and Per department to be able to benchmark employees to other employees from their respective store and department.

 

Please see the screenshot. The column highlighted in yellow, which I have partly filled manually, is what I am trying to achieve in DAX. employeebench.PNG

 

With this I can calculate a deviation of the employee versus his peers.

Thank you so much in advance.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Figured it out myself with this easy formula. Knew it was going to be easy but this...

 

Average Sales per Employee within department and city =
CALCULATE (
AVERAGE(Sales[Sales]);filter(
ALL(Sales[EmployeeNr]);Sum(Sales[Sales]) <> 0))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Figured it out myself with this easy formula. Knew it was going to be easy but this...

 

Average Sales per Employee within department and city =
CALCULATE (
AVERAGE(Sales[Sales]);filter(
ALL(Sales[EmployeeNr]);Sum(Sales[Sales]) <> 0))
jthomson
Solution Sage
Solution Sage

I'm not sure why you would necessarily need a DAX formula other than a standard average - if you were to put everything into a matrix with your measure being the average of your sales column, then putting city into the row section and department into the column section ought to show that average as a subtotal in the relevant places?

Anonymous
Not applicable

I would like to create a difference measure to peers and create nice visuals and trend lines rather than have it in a matrix. 

 

I believe I need DAX for this, but correct me if I am wrong 😉

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.