1 2 Previous Next 18 Replies Latest reply on Dec 22, 2013 11:51 AM by Charles Hooper

    8.1 Bug? 'Contains' now case-sensitve?


      I'm not sure if this something with 8.1 or just a weird bug.  I have a workbook that uses the following calculated field written as:


      if contains([campaign_name],'content') then 'y'

      else 'n'



      As far as I remember, this was working when I was using 8, but when I opened/saved in 8.1, the calculation is acting weird where it won't recognize the campaign names as containing that term and has become case-sensitve.  I just tried it again in tableau 8 and 'contains' worked perfectly.


      Anyone have any insights into this?

        • 1. Re: 8.1 Bug? 'Contains' now case-sensitve?

          I don't have any insights into whether or not it's a bug, but it can be remedied with the UPPER or LOWER functions  (e.g. if contains(UPPER([campaign_name]), 'CONTENT') then 'y' else 'n' end

          • 2. Re: 8.1 Bug? 'Contains' now case-sensitve?
            Bruce Segal

            Abigal: It must be a bug. However I had this problem in moving from ver 7 to 8.0. And since then in 8.0 and 8.1 my text calcs have always been case sensitive.


            I hope you don't have the hassle I encountered in having to rewrite all my text calcs to include both a capitalized and un-capitalized variant. Even better it pretty much doubles the length of my text calcs and the time it takes to code them.

            • 3. Re: 8.1 Bug? 'Contains' now case-sensitve?
              Shawn Wallwork

              Hi folks, using the Superstore data set I just test 7.0 & 8.0.6 & 8.1 and both these calculations gave the same result:


              CONTAINS( [Sub-Category], 'bookcases' )

              CONTAINS( [Sub-Category], 'Bookcases' )


              For all three versions of Tableau. I have seen somethings that are case-sensitive but since I can never remember which ones I always just assume everything is going to be case-sensitive.





              • 4. Re: 8.1 Bug? 'Contains' now case-sensitve?
                Bruce Segal



                When I switched from ver 7.0 to ver 8.0 those two calcs started to return a different result for each one for me.


                Any thoughts on how I can to diagnose it further to see if it's an issue on my end or w/ Tableau?

                • 5. Re: 8.1 Bug? 'Contains' now case-sensitve?
                  Shawn Wallwork

                  Bruce I think the most direct path to a solution would be to open a support case. They'll know the history of bug reports and might be able to tell you why you're getting that behavior. If they can reproduce it, then that will be another story. Send workbooks and screenshots showing that you're not 'nuts' and that the issues really does exist. Once you get past that hurdle they really are great to work with.


                  Good luck.



                  • 6. Re: 8.1 Bug? 'Contains' now case-sensitve?
                    Bruce Segal

                    Thanks Shawn.


                    Abigal want to tag team support on this one?

                    • 7. Re: 8.1 Bug? 'Contains' now case-sensitve?
                      Jim Thompson

                      See this discussion: http://community.tableau.com/thread/136763


                      I'm seeing case sensitivity now too suddenly....

                      • 8. Re: 8.1 Bug? 'Contains' now case-sensitve?
                        Bruce Segal

                        jim I first saw this behavior when I opened a wrkbook in ver 8.0 that I created in ver 7.0. All of a sudden the contains function was case sensitive. I too was using an extract and had to rewrite many text calcs to include case-sensitive conditions. while it's sometimes nice to be able to distinguish btwn cases, it usually doubles the time I spend writing calcs and increases the processing load on tableau.

                        • 9. Re: 8.1 Bug? 'Contains' now case-sensitve?
                          Charles Hooper

                          I have not seen this issue, but, since it was reported multiple times, I did some testing.

                          For one, I know that the case sensitivity always has been database specific.

                                 (Is NOT case sensitive in Access/Excel, IS case sensitive in Oracle)

                          First test:

                            Source Microsft database.

                            Workbook has four calculated fields looking at a field with value "West"





                            In all tests, each resolved to True...

                            Viewing in 8.0 - Not case sensitive

                            Ran EXTRACT - Not case sensitive

                            Published to 8.1 Server - viewed with Chrome AND IE11 - Not case sensitive..

                            Did web authoring from the published view - Not case sensitive.

                            Downloaded the (now) 8.1 workbook, off Sever and processed with:

                               8.1 Desktop - Not case sensitive.

                               8.1 Reader - Not case sensitive.

                          Next test - published the 8.0 extract, as a data source, to Server 8.1.

                            Opened that data source, from Server, with Desktop 8.1.

                            Rebuilt my view, using the four CONTAINS() calculted fields - Not case sensitive.

                          So, in all MY situations, the CONTAINS() is never treated as case sensitive…

                          Then, I ran the full set of tests against an Oracle database.  In all cases, the test WAS Case sensitive, as expected!

                          I am using the latest versions of Tableau Server and Tableau Desktop.  All 64 bit versions. 

                          If anyone seeing the issue can share a TWBX file exhibiting the problem, that would be great….

                          • 10. Re: 8.1 Bug? 'Contains' now case-sensitve?
                            Bruce Segal

                            Chuck: That's very interesting. And it may shed some light on the issue.


                            I see the problem using .xls data connections directly and when used to create an extract. The fact that you don't see it w/ .xls may suggest something else is going on.


                            I first encountered the issue (going from ver 7.0 to 8.0) when connected to a mysql dbase using custom sql and then putting that all into an extract.

                            • 11. Re: 8.1 Bug? 'Contains' now case-sensitve?

                              I have the same setup as Bruce, where I use custom SQL and then create an extract.

                              • 12. Re: 8.1 Bug? 'Contains' now case-sensitve?
                                Charles Hooper

                                Just ran through my tests using XLS file as source - original test used MS SQL.

                                Got same results with Excel - NOT case sensitive, for all tests…

                                Can you share a twbx, Excel extract based, where you are seeing the case sensitive issue?



                                Charles E. Hooper

                                e. chooper@bialytics.com

                                c. 209-988-5070

                                w. www.bialytics.com

                                Twitter: @chuck_hooper

                                • 13. Re: 8.1 Bug? 'Contains' now case-sensitve?
                                  Charles Hooper

                                  I had not used custom SQL in my initial tests.


                                  Just reran, using custom SQL to pull the data - ran all the tests and got same results.

                                  With Excel/Microsoft products, CONTAINS() was NOT case sensitive…





                                  Charles E. Hooper

                                  e. chooper@bialytics.com

                                  c. 209-988-5070

                                  w. www.bialytics.com

                                  Twitter: @chuck_hooper

                                  • 14. Re: 8.1 Bug? 'Contains' now case-sensitve?
                                    Jim Thompson

                                    Chuck- Hummm. Since others are seeing what I’m seeing, there is obviously some sort of snag somewhere. One thing is for sure—can you use your mighty weight (!?!!) and strongly recommend to Tableau that in Version 8.2 they include a CONTAINS_NCS and a CONTAINS_CS which always behave as expected (Not Case Sensitive and Case Sensitive) so we are not (1) dependent upon the underlying database and (2)can avoid this mysterious bug?!? They need to deprecate the CONTAINS function since you’re never sure how it behaves (apparently).




                                    1 2 Previous Next