Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get 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

Reply
Anonymous
Not applicable

Filter/Slicer Requirement

hi Team,

I have created a Powerbi visual like below:

Link 

 

When i click the date, the visual will appear and when no date is selected, it will show a message to select a date. It will be like below:

Link 

 

And in the visual i have few more filters like Band and Type.

 

My requirement is: when only the date is selected the visual should show.

 

But when the combination of Band&Date // Type&Date // Band&Type&Date, the visual should not show.  Below the case that should not happen.

Link 

 

Attaching the powerbi report here: PBIX 

 

Kindly help me!! @Ashish_Mathur @v-lid-msft 

 

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

what should happen if not date is selected, but there is one value for, say, Band?

here are measures which will show the visual and message when only of your slicers is active:

Filter = SWITCH(true();
    ISFILTERED('Table'[Date]) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Type])) && NOT(ISFILTERED('Table'[Name]));"#fffffff";
    ISFILTERED('Table'[Band]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Type])) && NOT(ISFILTERED('Table'[Name]));"#fffffff";
    ISFILTERED('Table'[Type]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Name]));"#fffffff";
    ISFILTERED('Table'[Name]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Type]));"#fffffff";
    "White")
Message = SWITCH(true();
    ISFILTERED('Table'[Date]) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Type])) && NOT(ISFILTERED('Table'[Name]));"";
    ISFILTERED('Table'[Band]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Type])) && NOT(ISFILTERED('Table'[Name]));"";
    ISFILTERED('Table'[Type]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Name]));"";
    ISFILTERED('Table'[Name]) && NOT(ISFILTERED('Table'[Date])) && NOT(ISFILTERED('Table'[Band])) && NOT(ISFILTERED('Table'[Type]));"";
    "Please select the Date to view the Pictorial Representation")

cheers,
Sturla

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.