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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
shantupm5
Helper III
Helper III

MedianX Function

Hello,

 

I have the below data which is outcome of a Measure, And i want to derive Median of this outcome. I used formula

 

=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?

 

 

shantupm5_0-1686320399402.png

 

7 REPLIES 7
v-yiruan-msft
Community Support
Community Support

Hi @shantupm5 ,

You can update the formula of your measure as below and check if it can return the correct result...

Median = CALCULATE(MEDIAN('Customer'[Achi %]),ALLSELECTED('Customer'))

vyiruanmsft_1-1686538661907.png

If the above one can't help you, please provide some raw data in your table 'Customer' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

The Customer Achi% in my question is output of measure, hence i am not able to apply the above solution. Please advice

 

Regards
Prashanth

Hi @shantupm5 ,

Please update the formula of measure as below and check if it can return the correct result...

Median = MEDIANX(ALLSELECTED('Customer'),[Achi %])

vyiruanmsft_0-1686634636131.png

If the above one can't help you, please provide more raw data in your table 'Customer' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

Its returning blank results 😞

 

Regards

Prashanth

Hi @shantupm5 ,

Could you please provide more raw data in your table 'Customer' (exclude sensitive data) with Text format, the formula of measure [Achi %] and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Here is the raw data

 

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 first pass %.

 

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

Hello @v-yiruan-msft

 

Please can you reivew and advice

 

Regards

Prashanth

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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