Forum Discussion

schoden's avatar
schoden
Post Partisan
6 years ago
Solved

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?

  • Hi schoden 

    try

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

9 Replies

  • az38's avatar
    az38
    Community Champion

    Hi schoden 

    try

    Column = IF( CONTAINSTRINGS([name],"mas") || ISBLANK([name]), 1, 0)
    • schoden's avatar
      schoden
      Post Partisan

      az38  Hi Thanks for the response..... 

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

      • az38's avatar
        az38
        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)