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
pavel_severov
Advocate I
Advocate I

How to ignore empty strings with "Advanced filtering"

Dear experts,

Please explain how to ignore empty strings with "Advanced filtering" for the table like below.
I.e. this filtering must select 1st and 3rd rows, and ignore the 2nd.

 

Table = DataTable("Name", STRING, "Value", STRING ,{
{"Text","Some text..."},
{"Empty String",""},
{"BLANK()",BLANK()}
})
UPDATE: The question is about impossibility to ignore empty strings in the right-side filters, even with Filter type = Advanced filtering.
2020-12-19 12_12_55-Test - advanced filtering for empty string - Power BI Desktop.png
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@pavel_severov 

It is not possible to do so with the filter filter pane. 

You can replace the empty with null in power query so that you will only see Blanks which you can filter in the Filter Pane

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
pavel_severov
Advocate I
Advocate I

@Fowmy
It's a pitty, I guessed it... Thanks for the confirmation!
Is it really solution? 🙂 Nevertheless, will accept it.

Fowmy
Super User
Super User

@pavel_severov 

It is not possible to do so with the filter filter pane. 

You can replace the empty with null in power query so that you will only see Blanks which you can filter in the Filter Pane

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

pavel_severov
Advocate I
Advocate I

Hi @CNENFRNL , @Fowmy ,

Thank you for valuable suggestions!
But problem is not in DAX - I see no possibility to ignore empty strings in the right-side filters, even with Filter type = Advanced filtering.
Do you maybe have an ideas - how to overcome it?
2020-12-19 12_12_55-Test - advanced filtering for empty string - Power BI Desktop.png

Fowmy
Super User
Super User

@pavel_severov 

I agree on == with @CNENFRNL .

Please try the table below:

TableFiltered = 

var __t = 

DataTable(
    "Name", STRING, "Value", STRING ,
    {
        {"Text","Some text..."},
        {"Empty String",""},
        {"BLANK()",BLANK()}
    }
)

return

FILTER(
    __t,
    NOT [Value] == ""
)

Fowmy_0-1608363491132.png

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

CNENFRNL
Community Champion
Community Champion

Hi, @pavel_severov , you might want to apply “strictly equal to” operator (==, not a emoji here 😂) to such a case. For example,

Exclude Empty String = 
CONCATENATEX (
    FILTER ( 'Table', NOT ( 'Table'[Value] == "" ) ),
    'Table'[Name],
    UNICHAR ( 10 )
)

Screenshot 2020-12-19 025915.png

 by the way, the usual "not equal to" operator isn't a "strict" one, it treats both BLANK() and "" as the same.

Screenshot 2020-12-19 030447.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

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.

Top Solution Authors