Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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.
Solved! Go to Solution.
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.
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.
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.
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."
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.
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.
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.
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."
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
26 | |
20 | |
19 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
24 | |
24 | |
22 |