{"action":"created","issue":{"url":"https://api.github.com/repos/metabase/metabase/issues/8486","repository_url":"https://api.github.com/repos/metabase/metabase","labels_url":"https://api.github.com/repos/metabase/metabase/issues/8486/labels{/name}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/8486/comments","events_url":"https://api.github.com/repos/metabase/metabase/issues/8486/events","html_url":"https://github.com/metabase/metabase/issues/8486","id":358172320,"node_id":"MDU6SXNzdWUzNTgxNzIzMjA=","number":8486,"title":"Filter by \"Is not\" or \"Does not contain\" excludes Null values in results","user":{"login":"ryan-tangocard","id":6126290,"node_id":"MDQ6VXNlcjYxMjYyOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/6126290?v=4","gravatar_id":"","url":"https://api.github.com/users/ryan-tangocard","html_url":"https://github.com/ryan-tangocard","followers_url":"https://api.github.com/users/ryan-tangocard/followers","following_url":"https://api.github.com/users/ryan-tangocard/following{/other_user}","gists_url":"https://api.github.com/users/ryan-tangocard/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-tangocard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-tangocard/subscriptions","organizations_url":"https://api.github.com/users/ryan-tangocard/orgs","repos_url":"https://api.github.com/users/ryan-tangocard/repos","events_url":"https://api.github.com/users/ryan-tangocard/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-tangocard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-07T18:45:28Z","updated_at":"2018-12-29T17:01:12Z","closed_at":"2018-12-28T04:04:36Z","author_association":"NONE","body":"When using the filter \"Is not* or \"Does not contain\" value it excludes null. \r\n\r\n- Your browser and the version: Version 68.0.3440.106 (Official Build) (64-bit)\r\n- Your operating system: Windows 10\r\n- Your databases: Redshift\r\n- Metabase version: 0.30.1\r\n- Metabase hosting environment: Beanstalk\r\n- Metabase internal database: Postgres\r\n\r\n*Repeatable steps to reproduce the issue*\r\n1. A table contains a date, amount and department.  The department column can be null\r\n2. Create a question that sums amount and group by department\r\n3. All departments including the null show with the totals\r\n4. Add the filter to exclude a single department using the \"Is not\" or \"Does not contain\"\r\n5. The results no longer show the null totals\r\n\r\nI understand that this how SQL works in terms of writing != or <> to filter out a value. It will also exclude null values, but in most cases, I would end up doing something like (field != 'value' or field IS NULL) so that I include null values. The other solution is to make sure I don't have any NULL values in any of my data models by adding something like nvl(department, 'not assigned').\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/metabase/metabase/issues/comments/450506096","html_url":"https://github.com/metabase/metabase/issues/8486#issuecomment-450506096","issue_url":"https://api.github.com/repos/metabase/metabase/issues/8486","id":450506096,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUwNjA5Ng==","user":{"login":"mvrabel","id":12628893,"node_id":"MDQ6VXNlcjEyNjI4ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/12628893?v=4","gravatar_id":"","url":"https://api.github.com/users/mvrabel","html_url":"https://github.com/mvrabel","followers_url":"https://api.github.com/users/mvrabel/followers","following_url":"https://api.github.com/users/mvrabel/following{/other_user}","gists_url":"https://api.github.com/users/mvrabel/gists{/gist_id}","starred_url":"https://api.github.com/users/mvrabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvrabel/subscriptions","organizations_url":"https://api.github.com/users/mvrabel/orgs","repos_url":"https://api.github.com/users/mvrabel/repos","events_url":"https://api.github.com/users/mvrabel/events{/privacy}","received_events_url":"https://api.github.com/users/mvrabel/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T17:01:12Z","updated_at":"2018-12-29T17:01:12Z","author_association":"NONE","body":"@salsakran Please wait. Even tough this isn't a MB specific issue it is an user experience issue.\r\nIt happend in our company that some of our reports didn't add-up as expected because of this issue. (We fixed it by replacing all NULL values with \"N/A\" string)\r\n\r\n**Why is this a problem**\r\nScenario: User filters rows by \"is column A != xyz \"\r\n1. Expected results:  all rows that are non-NULL in column A AND their value is not xyz\r\n2. Real results: all rows which value is not xyz INCLUDING rows that have NULL value"}}
{"actor":{"display_login":"mvrabel"}}