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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.