2 Replies Latest reply on Sep 12, 2019 9:12 AM by Joe Oppelt

    Null values in Excel vs database

    Anne Shepherd

      Version:  Tableau Desktop 2019.2.2


      I have a question about why a calculated field works one way using Excel as a data source and another way from a database (Redshift).  I created a workbook using Redshift as a datasource and wanted to use a small sample of the actual data from the database to create an Excel datasource.  I ran a query and exported the results to a csv, deleted some data, and saved it as an xlsx file to use as a datasource. I created the new workbook using Excel and created some of the same calculated fields I wanted from the original Redshift workbook.


      I noticed that one of the calculated fields did not work the same way handling null values as the Redshift version did.  If a value (string data type) is null, I wanted to replace it with a string name I created; otherwise use the existing string name.  In the Redshift version, if the name was null, it did get assigned the new string.  But in the Excel version it was still null (the calculated field is called Mapping Name). I don’t understand why and wondering if someone can provide an answer.


      Workbook is attached, and thank you for your assistance.