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
Atiroocky
Frequent Visitor

Matrix table filtered by measure ?

Hello everyone,

 

I have a question for DAX specialists about filtering matrix table values with "external" measure.

I would  like to know if it is possible to add filter/context on a matrix table with the result of another measure (true/false)

 

I fill a matrix table with a measure, lets say "Value_measure" from a "source table"

If I add filters in the Value_measure (calculate(max(values), col1_value<col2_value)) , the matrix table shows correct values.

If Value_measure = max(values) with no filter and that I create another "measure_filter" = if(col1_value<col2_value, true, false) and that I drag this measure_filter in the matrix filter panel and select only "true" values, it does not affect values.

But if I change visual from matrix to table, the measure_filter works fine. Strange ?
I also noticed that "measure_filter" works on matrix table if i copy/past code to a new column of the source table.

Am I right ?
Thanks for your answers.

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

In Power BI, filtering a matrix table with a measure that evaluates to true or false (like your measure_filter) can behave differently depending on how you apply the filter. The behavior you described is expected due to how filters work in matrix visuals.

  1. Matrix Visual Filtering: When you add a measure (e.g., Value_measure) to a matrix visual and apply filters to it using the "Visual-Level Filters" or "Report-Level Filters," it filters the values directly in the visual itself based on the criteria you specify. It does not affect other visuals.

  2. Matrix Filter Panel: When you add a measure (e.g., measure_filter) to the "Filters" pane of a matrix visual and choose to filter based on true or false values, it will filter rows in the visual that satisfy the condition you set in the measure.

    However, the filtering behavior in matrix visuals is such that it usually filters at the row level. This means that if you have a matrix visual with multiple columns and you apply a filter to one column using a measure like measure_filter, it will only affect the rows within that column, not the entire matrix visual.

  3. Table Visual vs. Matrix Visual: The behavior difference you noticed between table and matrix visuals is because table visuals inherently have a different structure than matrix visuals. When you apply a filter using measure_filter in a table visual, it filters the entire table because table visuals do not have columns in the same way matrix visuals do.

If you want to apply a filter at the matrix visual level that affects all columns and rows, you would typically use the "Visual-Level Filters" or "Report-Level Filters." If you want to filter specific columns in a matrix visual, you might need to consider different approaches, such as segmenting your data or using different visual types.

In summary, the behavior you observed is related to how filtering works in matrix visuals and is expected. To apply a filter that affects all columns and rows in a matrix visual, you should use "Visual-Level Filters" or "Report-Level Filters."

View solution in original post

1 REPLY 1
123abc
Community Champion
Community Champion

In Power BI, filtering a matrix table with a measure that evaluates to true or false (like your measure_filter) can behave differently depending on how you apply the filter. The behavior you described is expected due to how filters work in matrix visuals.

  1. Matrix Visual Filtering: When you add a measure (e.g., Value_measure) to a matrix visual and apply filters to it using the "Visual-Level Filters" or "Report-Level Filters," it filters the values directly in the visual itself based on the criteria you specify. It does not affect other visuals.

  2. Matrix Filter Panel: When you add a measure (e.g., measure_filter) to the "Filters" pane of a matrix visual and choose to filter based on true or false values, it will filter rows in the visual that satisfy the condition you set in the measure.

    However, the filtering behavior in matrix visuals is such that it usually filters at the row level. This means that if you have a matrix visual with multiple columns and you apply a filter to one column using a measure like measure_filter, it will only affect the rows within that column, not the entire matrix visual.

  3. Table Visual vs. Matrix Visual: The behavior difference you noticed between table and matrix visuals is because table visuals inherently have a different structure than matrix visuals. When you apply a filter using measure_filter in a table visual, it filters the entire table because table visuals do not have columns in the same way matrix visuals do.

If you want to apply a filter at the matrix visual level that affects all columns and rows, you would typically use the "Visual-Level Filters" or "Report-Level Filters." If you want to filter specific columns in a matrix visual, you might need to consider different approaches, such as segmenting your data or using different visual types.

In summary, the behavior you observed is related to how filtering works in matrix visuals and is expected. To apply a filter that affects all columns and rows in a matrix visual, you should use "Visual-Level Filters" or "Report-Level Filters."

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.