Skip to main content

Hi all,

 

I have a table with four variables in tableau,

Date,

Actual Passengers,

Passengers LY,

Passengers 2019

 

And I would like to create a new variable where when

date >='2022-01-03' take Passengers LY in the same date in LY(2021-01-04) or continues taking Passengers 2019

Is it possible?

find attached the file in excel with yellow color with the values which I want to introduce in the new variable.

 

Thank you very much

Fran

3 answers
  1. Jan 18, 2022, 12:23 PM

    Hi @Francisco José Milla​, below is a suggestion with 1-1 join using Tableau relationship, to avoid duplication.

     

    The assumption here is that you are picking next date of previous year. I hope this helps.

     

    Hi @Francisco José Milla​, below is a suggestion with 1-1 join using Tableau relationship, to avoid duplication. The assumption here is that you are picking next date of previous year. 

    Workbook attached for ref.

0/9000