Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Applies to Write-Back Server and Write-Back Cloud

Question

How can I update existing data with Write-Back?

When you are using Tableau sometimes you want users to be able to send the new information straight from the dashboards the users are visualizeingvisualizing. However, Tableau is a one-way data stream, which means that any change that you perform in Tableau will not be reflected in the underlying data.

Write-Back can really help you with this, although Write-Back does not actually update the underlying data (if you want to know why you have more information here), it is easy to implement a solution that simulates this operation while still keeping your data governed and secure.

Answer

Table of Contents
minLevel2
excludeRelated:*

The attached workbook has the full solution implemented and is using Writeusing Write-Back public demo environment, for more information on using it check our Public Demo instruction page.

Why Writing to a Separate Dataset?     Tableau: Relationships     Update Underlying Data.twbx

Step 1: Create a table visualization

...

So, the first step is to create a table at the minimum level of granularity you want to overlap.Create a table visualizationImage Removed


...


The right column identifies how many rows the data set has for the product name / order date combination. These two fields will act as a the business keys.

...

You configuration should look like this:

  • Primary Keys in the Write-Back Source Fields

  • New Input Fields - e.g. Quantity or Sales

  • Keep Write-Back in Form View



Step 3: Join with existing data

...

For this you can use Tableau relationships and connect your existing data with the Write-Back dataset using the keys defined.Join with existing dataImage Removed

...

Don't forget to filter Write-Back table by IsActive set to True to ensure you only get the latest snapshot provided by the users for each record. 

...

This calculated field has the function of verifying whether there is a value for that primary key or not on Write-Back:

  • If there is a value, the report show the value from Write-Back

  • otherwise it shows the original value

This way you get the best of both worlds, a well governed dataset for manual inputs and the end result looks like an update on the original data.

Optionally, you can display if a field was updated or not by creating another calculated field.Modify the Report to Include the UpdatesImage Removed

...

Step 4: One-to-One updates

Another factor that you should keep in mind is that: 

  • You can perform multiple updates for a specific key and to show only the most recent, you need to create a new calculated field with an LOD expression.

  • In alternative you can activate Write-Back setting of Unique Entries and this way Write-Back will ensure there is only one update per entry and regular calculated field will always work.

You can really choose the option that best suites your use case. 

...