6 Replies Latest reply on Aug 2, 2018 3:44 PM by Deepak Rai

    Filter based on username.

    Dae Park

      I'm new to Tableau and sorry if this question has been asked before, but I can't seem to find the answer.


      I have an issue where there's a dimension that I'm trying to filter on based on the username().


      I want it so when username "jcole" signs in, to filer on user_id field for 'jcole', but if anyone else signs in to filter on the null, within that field.


      This is what I have.


      Under the general tab, I have ALL selected so, Null and jcole are both checked.

      Under the condition tab, I have "By formula" selected with the below if statement.


      If USERNAME() = 'jcole'

          THEN [user_id] = 'jcole'

      ELSE [user_id] = NULL



      What's happening is that when jcole views the report, it works fine... jcole see's all his stuff.  When anyone else signes in, it shows nothing. 


      Shouldn't this filter show all the rows that have a NULL for user_id for anyone but jcole?


      What am I doing wrong?