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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.