Forum Discussion
LupinAinsworth
2 years agoFrequent Visitor
Matrix filtering
Hi All! I am trying to filter a matrix. To simplify, let's say I have two rows: state and city. For my value, I have count of new neighborhoods. I want to filter out any states that have less tha...
ExcelMonke
2 years agoImpactful Individual
Hi there,
Based on somewhat limited information in your post, this is what I would recommend:
You can create a measure that returns a 1 or 0 (or whatever you prefer) if a state has less than 5 new neighbourhoods. For example:
Filter =
IF (
CALCULATE (
[Count of New Neighbourhoods],
ALLEXCEPT ( LocationTable, LocationTable[State] )
) <= 5,
1,
0
)What this does is it will look at your count of new neighbourhoods on the state-level. If it is less than or equal to 5, it returns a 1, else a 0
LupinAinsworth
2 years agoFrequent Visitor
Thank you! This mostly seems to work - however, I do want the option to use this logic with slicers involving other fields, is that possible? Since it's less than I think it should work for this use case, but what if I was doing greater than?