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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
schoden
Post Partisan
Post Partisan

SQL NULL

Hi All, 

 

I want to filter name by %mas% OR NULL 

 

My Dax is : 

Column = IF( CONTAINSTRINGS(name),"mas" || name= Blank(), 1, 0)

 

But it is not filtering correctly, any idea?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @schoden 

try

Column = IF( CONTAINSTRINGS([name],"mas") || ISBLANK([name]), 1, 0)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

9 REPLIES 9
az38
Community Champion
Community Champion

Hi @schoden 

try

Column = IF( CONTAINSTRINGS([name],"mas") || ISBLANK([name]), 1, 0)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38  Hi Thanks for the response..... 

The code got me closer to the actual number , the difference is less  atleast 😄 

az38
Community Champion
Community Champion

@schoden 

sometimes it happens that blank is not exactly blank, so try to compare with empty string:

 

Column = IF( CONTAINSTRINGS([name],"mas") || ISBLANK([name]) || [name]=""), 1, 0)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 

It works the same, same ouput.

 

Thanks though 

az38
Community Champion
Community Champion

@schoden 

can you show example of row with incorrect result?

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38  Hi the green table is the actual table , the second table is from my power BI , power BI doesnt show/pick the blank row as seen in green table which is $528..

table.jpgtable 2.JPG

az38
Community Champion
Community Champion

@schoden 

Have you set "Show items with no data" as active for the left column in visual?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38  How can I set that ? , show item with no data in power BI 

az38
Community Champion
Community Champion

@schoden 

https://docs.microsoft.com/en-us/power-bi/desktop-show-items-no-data

maybe it will help you


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.