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.
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
Solved! Go to 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.
Best Regards,
Qiuyun Yu
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
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.
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.
Best Regards,
Qiuyun Yu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
78 | |
68 | |
63 |
User | Count |
---|---|
148 | |
107 | |
106 | |
84 | |
70 |