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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
shantupm5
Helper III
Helper III

Calculate Median Value

Hello,

 

I have the below raw data where i have First Pass Orders and Total Orders,

I had a measure to calcuate Customer wise First Pass %, which is sum of First pass orders / Total Orders. 

Then i need the median out of the results to identify the medain of first pass %.

 

I used the formulat =CALCULATE(MEDIANX(VALUES('Customer[Customer]),[Achi %])) and i get the Medain as 3.84%.
How ever when i compute the same data in excel sheet and use fomula =MEDIAN(J7:J12), i get the Median value as 61%.

Please can you let me know what is accurate and right way of calculating the Median Value?

 

 

Please advice

Customer NameFirst Pass OrdersTotal Orders
Customer A 0
Customer A 0
Customer A 0
Customer A 0
Customer B 0
Customer B 0
Customer B 0
Customer B 0
Customer B 7
Customer B 6
Customer D 1022
Customer D 879
Customer D 888
Customer D 640
Customer D 371
Customer D 690
Customer D 549
Customer D 1246
Customer D 942
Customer D 572
Customer D 864
Customer C34373733
Customer C37854292
Customer C38884277
Customer C29063141
Customer C29173147
Customer C36014200
Customer C30073535
Customer C34353787
Customer C34203915
Customer C26202963
Customer C23642687
Customer E18102079
Customer E21252310
Customer E19932106
Customer E14871713
Customer E15841828
Customer E19592386
Customer E21422486
Customer E19122151
Customer E20712308
Customer E16221809
Customer E19402190
Customer E20222264
Customer D 1344
Customer F14004095
Customer F12003280
Customer F15003755
Customer F17003863
Customer F15003532
Customer F14004303
Customer F12504286
Customer F13004466
Customer F15004628
Customer F17005324
Customer F15505969
Customer F14504858
Customer A 470
Customer A 470
Customer A 470
Customer A 46
Customer A 11
Customer A 6
Customer A 2
Customer A 5
Customer B 175
Customer B 149
Customer B 87
Customer B 23
Customer B 27
Customer B 27
Customer C27413259
Customer G 59386
Customer G 59381
Customer G 59374
Customer G 59365
Customer G 59381
Customer G 59377
Customer G 59377
Customer G 59375
Customer G 59296
Customer G 59423
Customer G 59415
Customer G 59321
Customer F142327512
Customer F147826382
Customer F136526497
Customer F133326847
Customer F176524261
Customer F165427660
Customer F178224594
Customer F180325235
Customer F179925503
Customer F171222412
Customer F189224786
Customer F180423821
3 REPLIES 3
some_bih
Super User
Super User

Hi @shantupm5 check for blanks, 

  • MEDIANX does not ignore blanks; however, MEDIAN does ignore blanks

https://learn.microsoft.com/en-us/dax/medianx-function-dax 

I hope this help in explaining difference in results





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Kishore_KVN
Super User
Super User

Hello @shantupm5 , 

It is not clear on which you want to create median, can you please elaborate and expalin your rquirement properly. 

 

 

Hello @Kishore_KVN 

 

Thanks for your response, 

I want to have a median for the output of the measure where i have calcuated the Account wise First Pass % (Sum of First Pass Orders / Sum of Total order processed).

 

Please advice

 

Prashanth

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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 Solution Authors
Top Kudoed Authors