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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Median in power BI is not matching with excel

 

Median of Cpk is different in power BI than in Excel (only for even count). I have checked the average of 2 middle values,in excel and in power BI but that is also not matching. This is the case for even count only not for odd count. Can anyone please help me solve this issue?

Please refer sample values

Median in excel = 8.51

Median in power BI Dashboard = 11.53

 

-2194.77777
-2194.77777
0.333333333
0.333333333
5.148148148
5.148148148
11.88
11.88
40.71428571
40.71428571
40.71428571
40.71428571
Median = 8.51
4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

I test with sample data which you shared and it works as excel which you mentioned. I think your issue may related to filters or other filter effect.

 

Please try to use following measures to see which one get the correct result:

Measure with all filters =
CALCULATE ( MEDIAN ( Table1[Value] ), ALLSELECTED ( Table1[Value] ) )


Measure with value filter(ignore other filters) =
CALCULATE ( MEDIAN ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Value] ) )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
themistoklis
Community Champion
Community Champion

@Anonymous

 

With these values i get the same median both in Excel and PowerBI.

 

I use the following formula:

 

Measure = MEDIAN('Table'[Values])

 Make sure you dont have any filters applied to any columns

Anonymous
Not applicable

Thanks for your help @themistoklis. But this is not working for me

 

@Anonymous

 

You can download the workspace with the median calculation from this link

 

You should see the value 8.51 on the card.

 

If you still have issues you can share your file with us

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.