Forum Discussion
DAX Median House Price by Postcode
- Anonymous3 years ago
DAX function to get the median price based on Postcode. Hope can give some hints to you.
dschin02 Well, columns are not dynamic but are calculated at time of data refresh. If that is OK then you can use a column. Measures are calculated on the fly. So, there are a lot of unknowns here. Does anything below the median get a blue color and anything at or above the median a red color? I don't get the rules for colorization. Also, sample data tends to REALLY help.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thanks Greg_Deckler ,
At this stage I am looking to just get a median house price by postcode, I would be happy to do this in a measure or a column. Is there an equivalant in DAX of Averageif(range,criteria,average range).
- Greg_Deckler3 years ago
Community Champion
dschin02 Use MEDIANX(FILTER(...), ...)