1 Reply Latest reply on May 25, 2017 11:38 AM by Shinichiro Murakami

    Create a table of deltas across two pivots (different dates)

    Rohan Vaswani

      Hi Everyone


      I am looking to migrate a simple, but manually created, table from Excel to Tableau. It is tricky because I'm attempting to create a table using calculated data in 2 other tables I've also created.


      The ask: I have summary tables by date. I need to calculate the difference between summary tables on different dates in a separate table.


      I've attached a simple example with data and the table i'm trying to build. This example essentially tracks what raw material was used for in a given day and the cost allocated to it.


      Attachment is organised by:

      1) Raw data: 4 columns with date, input, output, cost

      2) Summary tables: basically a pivot of input, output, and cost with totals

      3) A day on day delta: THIS is what I am trying to build - a difference of today's summary vs yesterday's summary

      4) Stretch goal: being able to pick any 2 days and calculate the delta between them


      There are similar posts on the forums, but both aren't exactly right. I'm also working off of a flat table and SQL isn't an option. These are the posts ive come across:

      Calculate deltas between 2 dimensions with common values

      Calculate difference in value based on two date parameters




      Thank you!