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

Create Visual Level Filter to take out "Blank" values which may be empty strings

I have a table that one field has a bunch of blank values and I would like to remove those rows. Putting a filter in of "is not blank" makes no difference as I believe these are empty strings, or possibly even a space.

 

1) How do I create a visual level filter to take out rows with empty strings?

 

2) When I try to use "is not" and then put in a space, when I click apply it resets the filter, so how do I create a visual level filter to remove rows where a field is just a space?

 

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

It might be a zero-length string.

Create a new column like this

new column=

Switch( true(),

isblank([column]) , "NA"

[column]="","NA",

[column])

 

And filter on NA

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

It might be a zero-length string.

Create a new column like this

new column=

Switch( true(),

isblank([column]) , "NA"

[column]="","NA",

[column])

 

And filter on NA

Anonymous
Not applicable


@amitchandak wrote:

It might be a zero-length string.

Create a new column like this

new column=

Switch( true(),

isblank([column]) , "NA"

[column]="","NA",

[column])

 

And filter on NA


This works and is how I will do it for now (I am just using isBlank instead of NA as NA could be an actual value inserted). Just a note, you missed a comma after isblank([column]) , "NA"

 

It is a pity though that this can't be done at a visual filter level thought, would be way quicker. Maybe they could add an empty string or no value field to the is and is not to give that filter a little more depth?

Greg_Deckler
Super User
Super User

Should be able to just use basic filtering and uncheck the boxes for the blank/blanks?


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable


@Greg_Deckler wrote:

Should be able to just use basic filtering and uncheck the boxes for the blank/blanks?


No, this will not work as it is filtering on what is needed and whats not needed. By selecting everything except for whats not needed, when the data is refreshed, if any new values come through (and this is invoice number, so that will happen), it won't select them and your results will not include anything new.

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.