Filter view based on fields not being null

Comments

3 comments

  • Bill Carovano

    Susan Warren - your solution sounds like a good one generally, using a calculation field that is set to 1 or 0 and then can be used for views.

    You should be able to set a variable to @all of [related app field] with nulls and then loop through each related item's field values to conditionally set your calc field to 1 or 0 (which will in turn update your view that uses that calc field)

    Here's an example of a for loop on a related item with conditional logic: https://help.podio.com/hc/en-us/community/posts/360006770179-Conditional-for-loop

     

    0
    Comment actions Permalink
  • Nicholas Mett

    Tableau needs to assign a value to everything whether it's a value you give it or null. The only way to not display something is with a filter.

    Having said that, it might be worth looking into sets, you could convert these into conditional sets based on player name. Sets usually add themselves to filter anyway since you need to exclude members not in the set to show the members in the set, but it might give you some more options. Would be helpful to be able to see exactly what you're trying to achieve though.

     
    0
    Comment actions Permalink
  • Susan Warren-Moy

    I figured out a way to do this which was far more simple. I set a calculation field up in the app template which is always hidden. In that I have put [field1].length + [field2].length + [field3].length etc - as below (Project is the name of the referenced field for each field - each Day references the same Project app which is why it looks odd here - in the calc I picked up Project from Monday, then Project from Tuesday etc.)

    The .length gives a 1 if there is a project set, and 0 if not.

    @All of Project.length + @All of Project.length + @All of Project.length + @All of Project.length + @All of Project.length + @All of Project.length;

    This gives a value from 0 (no groups) to 6 (a group every day Mon - Sat).

    I then set up a filtered view based on this number to be between 1 and 6 - this shows all results with at least 1 group.  I can also use this field to filter on those with no groups (number = 0) which is more elegant than a filter based on multiple fields being "not set".

    1
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk