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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sding
Frequent Visitor

The Power Bi median does not return the right value.

This is the chart for the Great Sydney area's median price(the blue line) and the number of sold (the bar chart) for each year.  The shared x-axis is the year number, a generated column from date of each row (= Table.AddColumn(#"Filtered Rows1", "Year", each Date.Year([sold_contract_date]), Int64.Type)). The data is from a government agency. It seems impossible the median prices are so "rounded"(900k,950k,1000k,1000k).

 

So I filtered the year 2019, used the "matrix" chart with the same other conditions, and export the one-column table (a .csv file) out. Then open with Excel, It has 4453 rows, and the median (2287th row) is 118300.

2.jpg2.png

I googled and read some posts from community.powerbi.com, but had no luck to find a similar question. I use DAX median function to do the same logic, which returns the same result. I just could not see any problems. The logic is very simple. There is only one filter of the other column from the same table. 

 

Many thanks to all in advance!

 

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Sding - This will be very difficult to troubleshoot without the data, can you share it?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Sding - So, I exported out the main table to Excel. If I take the median of the entire sold_price column for 1,048,576 rows in Excel I get 584,000. In Power BI, I get 529,950 for all rows (1,890,467 rows). Interestingly, if you remove your page filter, you get less rounded values, so not quite sure why that is.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg, thanks for your time and efforts.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.