3 Replies Latest reply on Jan 9, 2019 4:22 AM by Jim Dehner

    How to find next records in Tableau without self-join

    Thu Huynh

      I want to identify companies that received an investment from Great Britain followed by investment from Japan.

      In SQL, this is how to find an answer:

       

      SELECT DISTINCT japan_investments.company_name, japan_investments.company_permalink

      FROM crunchbase_investments japan_investments

      JOIN crunchbase_investments gb_investments

      ON japan_investments.company_name = gb_investments.company_name

      AND gb_investments.investor_country_code = 'GBR'

      AND gb_investments.funded_at < japan_investments.funded_at

      WHERE japan_investments.investor_country_code = 'JPN'

      ORDER BY 1

       

      How can I answer this question in Tableau without self-joining dataset?

      I tried LOOKUP but couldn't find a way to incorporate the funded_at date so that the LOOKUP only shows invesment of Japan after invesment of Great Britain.