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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LupinAinsworth
Frequent 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 than five new neighborhoods. How do I do this?! Seems like it should be simple but running into an issue where the filter pane option only seems to filter the lowest row level. Why? Or, if there is a better way to do this, to filter out the states with less than five new neighborhoods? Seems like it's some sort of groupby option, but having a hard time understanding how the pieces fit together.

2 REPLIES 2
ExcelMonke
Super User
Super User

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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? 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.