Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I want to hide or show visual base on my slicer which made from Field Parameter.
If I select completeness Status then I want to hide or show some visual.
My slicer is made from field parameter
My problem is, I try many way but got errors like "Parameter is part of composite key"
Solved! Go to Solution.
Create a DAX Measure for Visibility: You need to create a DAX measure that determines whether a visual should be shown or hidden based on the slicer selection. For example:
ShowVisual =
IF(
SELECTEDVALUE('Parameter Table'[Parameter Fields]) = "Completeness Status",
1,
0
)
This measure returns 1 if "Completeness Status" is selected, otherwise 0.
Use the measure to conditionally format the visual's transparency or visibility. You can do this by:
Selecting the visual you want to hide/show.
Going to the "Format" pane.
Finding the property that controls visibility (like "Transparency" or "Visibility").
Applying a rule based on the ShowVisual measure. For example, set transparency to 100% when ShowVisual is 0 and to 0% when ShowVisual is 1.
Alternatively, you can use bookmarks and the selection pane to control the visibility of visuals. Create bookmarks for different states (e.g., one with the visual shown and one with it hidden) and use the slicer to trigger these bookmarks.
Proud to be a Super User! |
|
Hi @Mokegubshook,
Thank you for reaching out to Microsoft Fabric Community Forum.
Power BI doesn’t truly "hide" visuals dynamically, but 100% transparency effectively makes it invisible to the user.
Make sure your Field Parameter is not part of a composite key in your model if you're joining it in relationships; don't relate it directly to other tables unless necessary.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu
Hi @Mokegubshook,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Vinay Pabbu
Hi @Mokegubshook,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Vinay Pabbu
Hi @Mokegubshook,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Vinay Pabbu
Hi @Mokegubshook,
Thank you for reaching out to Microsoft Fabric Community Forum.
Power BI doesn’t truly "hide" visuals dynamically, but 100% transparency effectively makes it invisible to the user.
Make sure your Field Parameter is not part of a composite key in your model if you're joining it in relationships; don't relate it directly to other tables unless necessary.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu
Create a DAX Measure for Visibility: You need to create a DAX measure that determines whether a visual should be shown or hidden based on the slicer selection. For example:
ShowVisual =
IF(
SELECTEDVALUE('Parameter Table'[Parameter Fields]) = "Completeness Status",
1,
0
)
This measure returns 1 if "Completeness Status" is selected, otherwise 0.
Use the measure to conditionally format the visual's transparency or visibility. You can do this by:
Selecting the visual you want to hide/show.
Going to the "Format" pane.
Finding the property that controls visibility (like "Transparency" or "Visibility").
Applying a rule based on the ShowVisual measure. For example, set transparency to 100% when ShowVisual is 0 and to 0% when ShowVisual is 1.
Alternatively, you can use bookmarks and the selection pane to control the visibility of visuals. Create bookmarks for different states (e.g., one with the visual shown and one with it hidden) and use the slicer to trigger these bookmarks.
Proud to be a Super User! |
|
Thank you for your respond!
I use your code but yurn out that it return 1 in every selection
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |