2 Replies Latest reply on Dec 5, 2018 11:09 PM by Vivek Nayagam

    How to get YoY when dates are not in order

    Vuk R

      For the image below, I'm attempting to order the promos from most recent at the top and display the YoY paid conversions for each respective promo. All promos that have the same name will always have the same month and day but different year. It's possible that some years will not have a promo. If there isn't a promo for the previous year, the current one should display N/A. I've tried using the YoY table calc but it does not work out successfully.

       

      Screen Shot 2018-12-05 at 10.06.16 PM.png

      I'm able to successfully get YoY values using table calcs if I structure the promos table like below. However I want it structured like the above table.

      Screen Shot 2018-12-05 at 10.06.26 PM.png

      Since the data is from an sql database, I could do the YoY calcs as a query from the database and feed it into Tableau that way. Would it be possible to do this solely using Tableau without having to perform it in sql? Any help would be appreciated. Thank you!