BASE DE DADOS DE CONHECIMENTO

Filter Out Values in Primary Data Source Which Do Not Exist in Secondary Data Source


Publicado: 14 Apr 2016
Data da última modificação: 25 Oct 2022

Pergunta

How to filter values from primary data source that do not exist in the second data source.

Ambiente

  • Tableau Desktop
  • Blended Data

Resposta

This example uses Superstore sample data and can be reviewed in the attached packaged workbook. 

Option 1

  1. In the secondary data source, there should be a orange chain icon indicating the field is linked. If it's not currently visible, click the blue broken chain icon to blend the data.
  2. In the secondary data source, add 'Order ID' to Filters.
  3. Select Null
  4. Select Exclude
  5. Press OK

Option 2

  1. Create a Calculated Field called "Data source filter" using the following formula (Note: the name of the field from the secondary data source will contain the data source name in the formula):
    IF ATTR([Order ID]) = ATTR([Returns (Sample - Superstore)].[Order ID]) 
    THEN 'Same' ELSE 'Different' 
    END
    
  2. Drag both the "Order ID" fields from the primary and the secondary data sources and place them next to each other on Rows
  3. Drag the newly created field to Filters and select Same.

Informações adicionais

To view the above steps in action, see the video below.
Note: the video has no sound. To view the video in higher quality, click the YouTube icon below to watch it on YouTube directly.


 
Este artigo resolveu o problema?