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
clarkpaul
Helper I
Helper I

DAX Weighted Average

I'm having trouble finding the weighted average by month.  I have the following data:

clarkpaul_0-1614174871897.png

The solution I'm trying to get to is the column Weighted Avg. 
Any help would be appreciated

1 ACCEPTED SOLUTION

clarkpaul_0-1614307323142.png

So the solution was to build 2 measures:

% of Hist Total = sum('Table'[Hist Value])/sumx(all('Table'),'Table'[Hist Value])

Weighted Avg = sum('Table'[Hist AR Value])*'Table'[% of Hist Total]

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@clarkpaul , Can you explain the formula?

clarkpaul_0-1614307323142.png

So the solution was to build 2 measures:

% of Hist Total = sum('Table'[Hist Value])/sumx(all('Table'),'Table'[Hist Value])

Weighted Avg = sum('Table'[Hist AR Value])*'Table'[% of Hist Total]

clarkpaul_0-1614178636924.png


I take the percentage of the Machines Sold by month to the total machines sold and multiply that result by the Feature Attach Ratio.

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.

Top Solution Authors