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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors