1
votes

I face actually an issue where I have a database in which I have a comment field in one table. It is a nvarchar(max) field. Indexing is not possible and not reasonable.

The Problem is that whenever I add this column to the showing columns in Tableau, Tableau adds a GROUP BY for that column. That is unexpected but not the real issue.

The real issue comes up then I want to exclude rows where no comment was entered. So I use QuickFilter -> Select from list -> Click "Exclude"-checkbox -> click NULL value.

Now Tableau adds an inner join to this filter which looks like it is retrieving all possible values and then joining via non indexed field "comment". This is incredible slow.

A simple "WHERE comment is not NULL" would run in milliseconds, the way Tableau does it, takes 10 minutes.

Is there another way to filter for "not NULL"? I am a newbie to Tableau.

Thanks a lot.

1
Hi Hugo, since you seem confident with SQL, have you tried writing a custom query yourself and running this in Tableau? - Ben P
You’re better off learning how to use Tableau efficiently than writing custom SQL with Tableau. Otherwise, you prevent Tableau from optimizing it’s queries. - Alex Blakemore

1 Answers

0
votes

First, to avoid causing the group by for your comments field, change it from a dimension to an attribute after you add it to the viz.

As to filtering a discrete string field to only non-null values, place your Comments field on the filter shelf and select the Use All choice in the radio buttons on the top of the General tab (don’t confuse that with the ALL button at the bottom of the choices). Then switch to the Condition tab in the filter dialog, and specify a formula as not isnull([Comments])