3 Replies Latest reply on Apr 18, 2018 5:24 AM by Donna Coles

# Sum values for two different dates

Total beginner here, so bear with me.

I suspect this is not a date issue. Might be a data formatting problem

I have a data table with three columns: ID, year, value. See table example below. The original  was a two entry excel table with ID as rows and Years as column and cells as value.

Easy in excel to calculate anything across two years.

How to do this in tableau with a pivoted table?

I need a new field that has the difference between the values at distinct dates.

E09000002 with value 1- value 3

E09000003 with value 2 - value 4

and so on

Au IDYearValue

E09000002

2001value 1

E09000003

2001value 2

E09000002

2002value 3

E09000003

2002value 4

Thanks

• ###### 1. Re: Sum values for two different dates

Hi Elena

Welcome to the Tableau Community.

What you're after is referred to in Tableau as a Quick Table Calculation which you can access by clicking on the 'carrot' (the down arrow) of the Value pill

Please see here for further information on this feature :

training video : Intro to Table Calculations

Also, FYI - In future, I suggest you look to post your query in to the main area of the forums, where it is likely to attract more attention.  This has been posted in the UK group area, where there is limited activity.

This is the main Community landing page https://community.tableau.com/welcome

Since you're new to the forums, can I suggest you go to the 'Get Started' area and have a read of the recommended reading (Getting Started in the Forums ).  The next time you have a question about how to do something in Tableau Desktop, either click on the 'Ask a question about Tableau Desktop' on the left of this page, OR if you're on the previous Community Welcome page, scroll down a bit and select 'Go to Forums' which will take you into the appropriate area to search/ask your question.

Regards

Donna

• ###### 2. Re: Sum values for two different dates

Thank you Donna, it worked

Now learning how to sort items by calculated field.

Apologies for posting in a random area of the forum.

• ###### 3. Re: Sum values for two different dates

No need to apologise Elena, great to hear you're getting sorted.  The Tableu online training videos are an excellent resource to help you learn.

Donna