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

Ignore visual level filter from a measure

Hi,

 

I have a measure [EmptyCheck]. I apply this filter on a visual as [EmptyCheck] = 1.

 

Now, I want to write another measure [Amount] that sums up some column and that ignores the filter coming from the visual filter. I know you can do this with REMOVEFILTERS or ALL in a CALCULATE-statement if the filter comes from a column. But in my case, it comes from a measure.

 

How would I write the [Amount] measure to get it to ignore the filter on the visual coming from [EmptyCheck]?

 

Cheers

1 ACCEPTED SOLUTION
AnalyticsWizard
Super User
Super User

@Mo_ 

In Power BI, measures cannot directly remove a filter applied by another measure because they are calculated based on the current filter context, and they don't modify that context. However, you can work around this by reconsidering how the [EmptyCheck] measure is applied.

 

If you need the [Amount] measure to ignore the filter set by [EmptyCheck], you should ensure that [EmptyCheck] is not affecting the filter context in which [Amount] is being calculated. One way to do this is to use the `CALCULATE` function with `REMOVEFILTERS` or `ALL` in the [Amount] measure, but it won't override the visual-level filter applied by [EmptyCheck]. Instead, you need to structure your report so that [EmptyCheck] isn't affecting the calculation of [Amount].

 

Here is a conceptual approach to how you might achieve this:

1. Instead of applying [EmptyCheck] as a visual-level filter, use it within another measure to conditionally calculate the result only when [EmptyCheck] equals 1. For example:

 

Conditional Amount =
IF(
[EmptyCheck] = 1,
[Amount], // This is your original Amount measure
BLANK()
)



2. Then, use this new `Conditional Amount` measure in your visualizations instead of applying [EmptyCheck] directly as a filter. This allows the [Amount] calculation to remain unaffected by [EmptyCheck].

 

3. The original [Amount] measure should simply sum up the column you're interested in, without considering [EmptyCheck]:

 

Amount = SUM(Table[ColumnName])

 

This way, [Amount] is not impacted by [EmptyCheck], and you can use `Conditional Amount` in your reports where you want to display amounts only when [EmptyCheck] is 1.

 

Remember that the context in which measures are evaluated is crucial. Measures calculate values using the current filter context, and while they can't remove filters from other measures directly, you can design your report and measures in a way that the filters are applied conditionally, as shown above.

 

If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Visual-level filters only filter data for a given visual, whether it's a table, chart, card, slicer, and so on.

AnalyticsWizard
Super User
Super User

@Mo_ 

In Power BI, measures cannot directly remove a filter applied by another measure because they are calculated based on the current filter context, and they don't modify that context. However, you can work around this by reconsidering how the [EmptyCheck] measure is applied.

 

If you need the [Amount] measure to ignore the filter set by [EmptyCheck], you should ensure that [EmptyCheck] is not affecting the filter context in which [Amount] is being calculated. One way to do this is to use the `CALCULATE` function with `REMOVEFILTERS` or `ALL` in the [Amount] measure, but it won't override the visual-level filter applied by [EmptyCheck]. Instead, you need to structure your report so that [EmptyCheck] isn't affecting the calculation of [Amount].

 

Here is a conceptual approach to how you might achieve this:

1. Instead of applying [EmptyCheck] as a visual-level filter, use it within another measure to conditionally calculate the result only when [EmptyCheck] equals 1. For example:

 

Conditional Amount =
IF(
[EmptyCheck] = 1,
[Amount], // This is your original Amount measure
BLANK()
)



2. Then, use this new `Conditional Amount` measure in your visualizations instead of applying [EmptyCheck] directly as a filter. This allows the [Amount] calculation to remain unaffected by [EmptyCheck].

 

3. The original [Amount] measure should simply sum up the column you're interested in, without considering [EmptyCheck]:

 

Amount = SUM(Table[ColumnName])

 

This way, [Amount] is not impacted by [EmptyCheck], and you can use `Conditional Amount` in your reports where you want to display amounts only when [EmptyCheck] is 1.

 

Remember that the context in which measures are evaluated is crucial. Measures calculate values using the current filter context, and while they can't remove filters from other measures directly, you can design your report and measures in a way that the filters are applied conditionally, as shown above.

 

If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

@AnalyticsWizard 

Thank you for taking the time to give such a detailed answer.

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.