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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jarmstrong
Frequent Visitor

Coefficient of Dispersion

I'm trying to calculate the coefficient of dispersion in Power BI. Ideally this could be calculated for the subset of data select by slicers.

It's calculated by the following equations in excel. I can't seem to get the row level sale ratio subtracted from the set level median.

Any help would be greatly appreciated.

ValueSale Price   
260000425000=ROUND(A2/B2,2)=ABS(C2-$C$14) 
65000100000=ROUND(A3/B3,2)=ABS(C3-$C$14) 
7438990000=ROUND(A4/B4,2)=ABS(C4-$C$14) 
128663160000=ROUND(A5/B5,2)=ABS(C5-$C$14) 
9000001345000=ROUND(A6/B6,2)=ABS(C6-$C$14) 
15500001009900=ROUND(A7/B7,2)=ABS(C7-$C$14) 
4200001517800=ROUND(A8/B8,2)=ABS(C8-$C$14) 
205000370000=ROUND(A9/B9,2)=ABS(C9-$C$14) 
6500001000000=ROUND(A10/B10,2)=ABS(C10-$C$14) 
104300285000=ROUND(A11/B11,2)=ABS(C11-$C$14) 
125500160000=ROUND(A12/B12,2)=ABS(C12-$C$14) 
96000180000=ROUND(A13/B13,2)=ABS(C13-$C$14)COD
  =MEDIAN(C2:C13)=AVERAGE(D2:D13)=D14/C14*100

 

Thank You.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jarmstrong,

 

Please refer to below formula to achieve your requirement.

 

Calculate columns:

Round Value = ROUND([Value]/[Sale Price],2) 

ABS Value = ABS([Round Value]-MEDIANX(ALL(Sales),[Round Value]))

Measures:

Median Round Value = CALCULATE(MEDIAN(Sales[Round Value]),ALL(Sales)) 

AVG of ABS Value = CALCULATE(AVERAGE(Sales[ABS Value]),ALL(Sales)) 

Percent of AVG = [AVG of ABS Value]/[Median Round Value]*100 

Result:

3.PNG

4.PNG

 

Regards,
Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jarmstrong,

 

Please refer to below formula to achieve your requirement.

 

Calculate columns:

Round Value = ROUND([Value]/[Sale Price],2) 

ABS Value = ABS([Round Value]-MEDIANX(ALL(Sales),[Round Value]))

Measures:

Median Round Value = CALCULATE(MEDIAN(Sales[Round Value]),ALL(Sales)) 

AVG of ABS Value = CALCULATE(AVERAGE(Sales[ABS Value]),ALL(Sales)) 

Percent of AVG = [AVG of ABS Value]/[Median Round Value]*100 

Result:

3.PNG

4.PNG

 

Regards,
Xiaoxin Sheng

mattbrice
Solution Sage
Solution Sage

This was a bit on an interesting problem so i took a try at it.  Here is a link to an Excel 2016 wb you can download.  It should translate easy over to power bi.  

 

Download Link

 

 

Thank you for your effort with this. I've been unable to translate your answer to Power BI.

Post a link to what you do have if you can.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors