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
DEFresh3451
Regular Visitor

Help with finding a median and weighted average given two columns

Hello

I am a n00b here, so bear with me. I have a data set where I am trying to find multiple median values, and then want to find the weighted average of those medians.

 

Here is a sample data set:

Capture.PNG

 

 

 

 

 

 

 

 

 

I am trying to find a median of Total for each of the Group A and Group B combos: AC, BC, AD, BD. My Data set has a large number of combos, so I am looking for something dynamic.

 

Part 2 would be to then take the medians I just found, and perform a weighted average. 

 

Is there a way to do this?

 

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

@DEFresh3451 Here is a way you can do this. 

Create a new column which combines Group A and Group B

calculated column.PNG

Then create a table that gets the median value per combo group:

Group Medians = SUMMARIZE(Groups,Groups[GroupCombo],"Median",MEDIAN(Groups[Total]))
 

Not sure what you mean by weighted average of medians- can you please explain further or post an example of the desired result?

View solution in original post

2 REPLIES 2
djurecicK2
Super User
Super User

@DEFresh3451 Here is a way you can do this. 

Create a new column which combines Group A and Group B

calculated column.PNG

Then create a table that gets the median value per combo group:

Group Medians = SUMMARIZE(Groups,Groups[GroupCombo],"Median",MEDIAN(Groups[Total]))
 

Not sure what you mean by weighted average of medians- can you please explain further or post an example of the desired result?

Thank you!!!

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.

Top Kudoed Authors