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

Calculation of the median - deviations to Excel

Hello guys,

 

I wanted to calculate the median in Power BI. We have a lot of rows full of data about the days we needed for a repair. In a different column we have listed in which workshop the repair was done and what kind of repair it was.

So in Power BI Desktop I filtered one workshop and showed in a visual the data of the different kinds of repairs and the days for them as a median. Now I get different results compared to a calculation in Excel. I used there the formula =median(.....).

 

Why is there a deviation between these programs?

 

Greetings,

Christopher

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Based on my test, the Median() returned value in Power BI desktop is correct. In your scenario, when you filter in Excel for [Shipping month] and [Accounting Indicator], you need to modify the data range in Median() function. You can download attached .pbix and Excel file to have a look.

 

q3.PNG

 

 

Best Regards,
Qiuyun Yu

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

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Can you share us sample data and DAX you specified? Show us the pictures to indicate the difference of median value in Excel and Power BI.

 

Best Regards,
Qiuyun Yu

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

Hi @v-qiuyu-msft,

 

thanks for your answer. Here I´ve got two screenshots, one from Power BI and one from Excel. The data is only filtered by the accounting indicator (1C) and the shipping month (May). In Excel I got 4,97 days (which is correct), in Power BI only 2,79 days. After filtering the data in Excel and Power BI I get 452 rows in both programs, so there isn´t a fault by false filtering the data.  

ExcelExcelPower BIPower BI

Best regards

Christopher

Hi @Anonymous,

 

Based on my test, the Median() returned value in Power BI desktop is correct. In your scenario, when you filter in Excel for [Shipping month] and [Accounting Indicator], you need to modify the data range in Median() function. You can download attached .pbix and Excel file to have a look.

 

q3.PNG

 

 

Best Regards,
Qiuyun Yu

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

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.