4 Replies Latest reply on Aug 2, 2017 8:57 AM by Cynthia Derksen

# Table and Graphic displaying Last Year total - this year by month then YTD.

Hello,

This is where I am stumped.    I don't know how to split a date?  Is it a formula or some kind of grouping that I need to do in a calculation or something?

Anything would be helpful!  Right know, I have been piecing 2016 in one table to a 2017 Monthly table with a YTD total.

It is hope to have a graphic show the say way too.

Sales2016 YEJan-17Feb-172017 YTD (Calculated Total)
Furniture\$2,000.00\$150.00\$250.00\$400.00
Appliances\$4,000.00\$100.00\$400.00\$500.00
Total (Calculated Total)\$6,000.00\$250.00\$650.00\$900.00
• ###### 1. Re: Table and Graphic displaying Last Year total - this year by month then YTD.

Hi

Dates in tableau can be challenging - I would suggest you spend an hour and view the video below - it is probably more than you need for this calculation (probably covered in the first 10 minutes) but you will understand the variety of date functions and the difference in the 2 date types

See the link below and go to the "Date with Roddy" video

Let me  know if this helped

Jim

• ###### 2. Re: Table and Graphic displaying Last Year total - this year by month then YTD.

Hi Cynthia,

Can you explain a bit more on this please?

Date Splits in tableau can be done using 'DatePart' function.

If I understand your question right, I might be able to help

Thanks,

Amar

• ###### 3. Re: Table and Graphic displaying Last Year total - this year by month then YTD.

Jim,

Thank you, I haven't discovered the TDT video library.  I will check it out.

• ###### 4. Re: Table and Graphic displaying Last Year total - this year by month then YTD.

Amar,

In my above example,  I would like to show the total for last year on the same line as my current year Month to Month.  I was just thinking about adding the date three times but can I filter it by time frame displayed.  Or is there some type of hierarchy that can be used on a date?