Forum Discussion
Rankx overrides Filter
Hello, all,
I am looking at housing data. I want to view the top zip codes by median days on the market in a state. My chart works fine until I introduce the ranking. I have a page filter for california and the chart only returns california zipcodes and their median days on the market. When I add my rankx measure every zip code from the source data is added to the chart non California zip codes return a blank value for median days on and a ranking of 1. Below is the rankx measure I created. Any help would be appreciated, Thanks!
- Anonymous6 years ago
Hi Anonymous ,
Please find the pbix attached.
Have made some changes to the data model.
Regards,
Harsh Nathani
4 Replies
- AnonymousNot applicable
Hi Anonymous ,
Can you please share some sample data and expected output to help you better with the issue.
Regards,
Harsh Nathani
- AnonymousNot applicable
Hello, Anonymous
The data I am using looks similar to the tables below. I have a table on housing data and a geography table. The visualization is just a chart. with the columns Full zip code, median days on market, and the ranking measure. The filters on the visual are Month, Year, and State which is drawing from the Geography table. I am trying to use the ranking measurement as a filter to only display the top ten zipcodes.
NOTE:
I made a mistake when typing my measure in the original post it actually pulls from only one table. Here is what the measure actually is:Days_on_Rank = Rankx(ALLSELECTED(Table_One),CALCULATE(SUM(Table_One[median_days_on_market])),,1)
------------------------------------------------------------------------------------------------------------------------------------------------
Data Table:Full zip Code Median days on market Month Year 90001 23 03 2020 90002 30 03 2020
------------------------------------------------------------------------------------------------------------------------------------------------
Geography Table:Full Zip code State 90001 CA 90002 CA ------------------------------------------------------------------------------------------------------------------------------------------------
Expected Output:Full Zip code Median days on market Rank 90242 14 1 91942 15 2 92116 16 3
------------------------------------------------------------------------------------------------------------------------------------------------
Actual Output:Full Zip code Median days on market Rank 01001 63.5 1 01002 30.5 1 01007 49. 1 - AnonymousNot applicable
Hi Anonymous ,
Please find the pbix attached.
Have made some changes to the data model.
Regards,
Harsh Nathani