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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.