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

Join 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.

Reply
Anonymous
Not applicable

Always select Blank in the Filter

Hello 😄

I want to improve the User Experience of my report, so i was wondering if there's any way to deal with this kind of situation:

I have a left joined table, a column call 'seasons' for example, has ['Blank','Summer','Winter','Fall','Spring'].

 

I need that always that an user select a season (Summer','Winter','Fall','Spring) also includes the 'Blank' ones.

I know that is solve by just selecting both options but i want that the users dont know that, if they select Summer & Winter for example the 'Blank' option will be also selected automatically somehow.

 

Thank you!!

 

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please try like this:

  • Create a table
Seasons = VALUES('Table'[Seasons])
  • Create a measure
Measure =
IF (
    SELECTEDVALUE ( 'Table'[Seasons] ) IN ALLSELECTED ( Seasons[Seasons] )
        || SELECTEDVALUE ( 'Table'[Seasons] ) = BLANK (),
    1,
    0
)

 2.gif

For more details, please see the attachment.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Please try like this:

  • Create a table
Seasons = VALUES('Table'[Seasons])
  • Create a measure
Measure =
IF (
    SELECTEDVALUE ( 'Table'[Seasons] ) IN ALLSELECTED ( Seasons[Seasons] )
        || SELECTEDVALUE ( 'Table'[Seasons] ) = BLANK (),
    1,
    0
)

 2.gif

For more details, please see the attachment.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, I would like to build on your answer and ask if it is possible to modify the procedure so that cross-filtering is possible. I have already opened a new issue for this: Always select Blank in the Filter combined with Cross Filtering 

 

Basically, I want to filter a table using two slicers that include all blanks for a selected option. At the same time, however, I want to ensure that slicer 2 only displays the options that remain after the table has been filtered by the first filter. Do you have any ideas?

Greg_Deckler
Super User
Super User

You would have to write your measures to account for this. The general structure would be something like:

Measure =
VAR __Selected = SELECTEDVALUE('Table'[Season])
VAR __Table = FILTER(ALL('Table'),[Season] = __Selected || ISBLANK([Season]))
RETURN
<some calculation over __Table using "X" functions>


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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