Forum Discussion

wasonj1's avatar
wasonj1
Frequent Visitor
5 years ago
Solved

How to create slicer with null and not null?

Hi,

I have an IP Address column where there are various IP values and nulls. I want to set up a slicer to show null or not null values, does anyone know how I can set that up? I have my slicer set up to show the null values, but not sure how to do a not null option. I do not want the slicer to show each individual IP address because then it is a huge list that is not useful. 

 

  • Hi wasonj1 ,

     I am assuming that your IP Address column is TEXT type in Power BI.

     

    You can create a calculated column using DAX something like this:

     

    newSlicer = IF(yourtable[ColumnName] = "null", "null", "not null")

     

    In the above DAX formula replace yourtable[ColumnName]  with your table name and column name that has IP address values.

     

    Then use this newSlicer  column as a slicer.

     

    Thanks,

    Pragati

2 Replies

  • Hi wasonj1 ,

     I am assuming that your IP Address column is TEXT type in Power BI.

     

    You can create a calculated column using DAX something like this:

     

    newSlicer = IF(yourtable[ColumnName] = "null", "null", "not null")

     

    In the above DAX formula replace yourtable[ColumnName]  with your table name and column name that has IP address values.

     

    Then use this newSlicer  column as a slicer.

     

    Thanks,

    Pragati

    • wasonj1's avatar
      wasonj1
      Frequent Visitor

      That did it perfectly! Thank you for your help!