Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I’m trying to apply a filter to a DAX measure in the “Filters on this visual” pane, but the filter option appears completely grayed out, like it’s disabled. I can’t change the filter type (e.g., from “is less than” to “is”) or enter any values.
The measure returns 1 or 0 depending on whether a slicer contains a specific value. My goal is to show or hide a visual based on this condition. I even tried modifying the measure to return text (“Show” / “Hide”), but it still doesn’t work.
I’ve already tried:
Adding the measure directly to the visual.
Creating a new measure with a different name.
Restarting Power BI.
Using the page-level filter pane instead of visual-level.
Has anyone faced this issue or knows how to unlock the filter on a measure?
Thanks a lot!
Solved! Go to Solution.
Thankyou, @MasonMA, @lbendlin, for your response.
Hi ximenarasu,
We appreciate your question on the Microsoft Fabric Community Forum.
We understand that you are trying to apply a filter on a DAX measure in the “Filters on this visual” pane, but it is greyed out or disabled. This happens because Power BI does not allow filtering visuals directly using DAX measures. Measures calculate values on the fly and do not store fixed values like columns do.
Since you want to show or hide a visual when selecting something from a slicer (for example, when "Product A" is selected), here is a simple way to do it using a calculated column and visual-level filters.
Please follow these steps:
This will make the chart show data only when "Product A" is selected. Otherwise, the chart will be hidden.
You can also create a measure:
ShowMessage =
IF(SELECTEDVALUE(SalesData[Product]) <> "Product A", "Please select Product A to view chart", BLANK())
Add this measure to a Card visual to display a message when the chart is hidden.
We have attached a screenshot and a sample pbix file for your reference:
If this helps you, please mark the response as the accepted solution and give kudos. This will help others with similar questions.
If you have more doubts, please feel free to ask the Microsoft Fabric community.
Thank you.
Thankyou, @MasonMA, @lbendlin, for your response.
Hi ximenarasu,
We appreciate your question on the Microsoft Fabric Community Forum.
We understand that you are trying to apply a filter on a DAX measure in the “Filters on this visual” pane, but it is greyed out or disabled. This happens because Power BI does not allow filtering visuals directly using DAX measures. Measures calculate values on the fly and do not store fixed values like columns do.
Since you want to show or hide a visual when selecting something from a slicer (for example, when "Product A" is selected), here is a simple way to do it using a calculated column and visual-level filters.
Please follow these steps:
This will make the chart show data only when "Product A" is selected. Otherwise, the chart will be hidden.
You can also create a measure:
ShowMessage =
IF(SELECTEDVALUE(SalesData[Product]) <> "Product A", "Please select Product A to view chart", BLANK())
Add this measure to a Card visual to display a message when the chart is hidden.
We have attached a screenshot and a sample pbix file for your reference:
If this helps you, please mark the response as the accepted solution and give kudos. This will help others with similar questions.
If you have more doubts, please feel free to ask the Microsoft Fabric community.
Thank you.
Hi! @MasonMA @lbendlin @v-pnaroju-msft
Thank you so much for your detailed explanation and help. I understand now why measures can't be used directly as filters on visuals, and your solution makes perfect sense for bar charts.
However, I’m trying to apply this logic to a gauge chart (used as a thermometer to show task completion rate). The problem is that, when the slicer filters out the "Completed" tasks, the gauge still appears, but shows 0% and doesn't disappear. The title and gauge remain visible, which is misleading.
What I want to achieve is this:
If “Completed” tasks are selected → show the gauge with the completion rate
If “Completed” is not selected → hide the gauge and show a bar chart instead, comparing “Not Started” and “In Progress” tasks.
My idea was to overlay both visuals and use a conditional field to toggle visibility based on the slicer selection, but as shown in the attached screenshots, that doesn’t work well with the gauge.
Is there a workaround or best practice for switching between visuals based on slicer values, especially when working with gauge charts?
Thanks again for your help! 🙌
(I’ve attached a screenshot of what the gauge looks like when "Completed" is not selected.)
There is no programmatic way to hide/show visuals. Best you can do is mess with the transparency settings of the visual background, but then you lose interactivity for the visual at the back of the z order.
If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com
Correct, values from field can be used as visual-level filter, but i'm not 100% sure this would be a workaround unless user can share a sample file so we can validate the solution, like @lbendlin mentioned, because it sounds like @ximenarasu would prefer to link a measure that returns 1 or 0 with visual control.
Anyways, please share the feedback so we can learn together:)
please provide more details about your scenario. Measures as filters cannot return boolean, for example.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Hi, i don't think measures can be used as visual-level filters directly in the "Filters on this visual" pane unless they return a scalar value AND the visual context allows evaluation.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |