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
Anonymous
Not applicable

How to Dynamically Show or Hide a Visual with multiple criteria ?

Hello,

Milou190_0-1660742364695.png

I am currently working on modifying a project management software within my company. This is the page I need to edit. The project site is indicated at the top right, in the middle is the title of the project, the year and then various indicators show the progress of the project, the name of the project manager... At the top left, is a funnel that allows you to make a selection of these indicators (for example, search for the site of a factory, the name of a project, etc.). This filter is a button whose type is a bookmark, and which redirects to the filters page.

Milou190_1-1660742390372.png

This is my filters page. 

What I was asked to do : when a user lands on the first page, nothing should be displayed. Only 'empty' or 'please select a project'. Indeed, when the user arrives on the page currently, we find the first project in alphabetical order 'Garage 4.0 - Abidjan'. I would also like all other filters to be empty as long as no one has selected a filter.

I found a very interesting website : Dynamically Show or Hide Power BI Visual Based on Slicer Selection (mssqltips.com)

So, when I select the project's title, I see the title, and when nothing is selected, I have a notification 'please select a project first'

Milou190_2-1660742639863.png

I used this for the measure : 

Message Text = 
IF (
    ISFILTERED ( Project[Title] ),
    "",
    "You must first select a Project"
)

So, how can we do so that the measurement Message Text = IF ( ISFILTERED ( Project[Title] ), "", "You must first select a Project" ) accept multiple transparency settings? In my case, I want my title to display when in the filters I have either selected 'title' or 'DE' (see in the filter page) which corresponds to the code of the project, otherwise display 'You must first select a project'. I tried to do Message Text = IF ( ISFILTERED ( Project[Title] ), ISFILTERED (Project[DE]), "", "You must first select a project" ) but it does not accept more than 3 arguments... Do you have any idea how I could do it?

Thanks in advance !

Emilie

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

instead of comma use ||  (two pipes)  to indicate an  "or" condition.

if you want both to be filtered, use &&

View solution in original post

7 REPLIES 7
lbendlin
Super User
Super User

IF(ISFILTERED(Title) && ISFILTERED(DE),...,...)

Anonymous
Not applicable

Hello again,

Thanks for helping me with my problem earlier. However, I am faced with a new problem... Indeed, my filter works great, now when I select a title or a DE, the 'you must first select a project' page becomes transparent and I can see my filters. But when I want to click on a visual, it's impossible (I can't enlarge a visual, interact with them, click on the wheels to scroll the tables...) because the filter, even if it is transparent, remains above the visuals. I can't put it in the background because otherwise it stays in the background when I have no selection. I would have to add a dynamic function that would go into the background when the filters are selected, and into the foreground when nothing is selected. I admit that as a beginner it's starting to get really complicated for me and I can't find anything on the forums... Could you help me? Thanks !

Think about your report users. Figure out what the fastest way for them is to get to insights. Redesign your report accordingly.

Anonymous
Not applicable

YEEEESS it's work !! thank you very much !!

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Is your problem solved by @lbendlin 's solution? If so, would you mind accept the helpful reply as solution? Then we are able to close the thread. More people who have the same requirment will find the solution quickly and benefit here, thank you!

If you still need further help, please feel free to let me know.

 

Best Regards,
Community Support Team _ kalyj

lbendlin
Super User
Super User

instead of comma use ||  (two pipes)  to indicate an  "or" condition.

if you want both to be filtered, use &&

Anonymous
Not applicable

Hi @lbendlin ,

It is not working... 

Milou190_0-1661264465308.png

I also tried this :

Milou190_1-1661264624812.png

I don't know what to do...

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.