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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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