2 Replies Latest reply on Sep 7, 2018 3:24 AM by Nipa Madhani

# Daterange in text table

Hi,

I want to know, is it possible to show date ranges in text table like below?

The screenshot has a date in a string(which is hardcoded in a formula) instead of this, I want an actual date. Please let me know if this is possible in Tableau.

For example, the table should have date ranges for the current year vs previous year and its sum of sales.

In the above screenshot [Easter], [Spring] etc are set with specific dates.

is there any better way to achieve this? a better way to see sales in the holiday season?

Regards,

• ###### 1. Re: Daterange in text table

Hi Nipa,

You can split them into 2 dates: start and end using the formula below.

[PY Holiday Start Date]

DATE(TRIM( SPLIT( [PY Holiday Date], "|", 1 ) ))

[PY Holiday End Date]

DATE(TRIM( SPLIT( [PY Holiday Date], "|", 2 ) ))

The above formula will convert the strings into dates. I'm not able to say if you can do sales comparisons without seeing an actual data. Hopefully this resolves your question. If no, then please attach a sample dummy dataset.

Ossai

• ###### 2. Re: Daterange in text table

Hi Ossai,

Thanks for looking into my issue. However, the solution which you gave me doesn't solve my problem. I have a simple requirement "Compare the sales of this year-2018 vs the last year-2017 by using order date"

Question: How many orders we placed during the holiday season this year vs last year?

List of Holidays

Summer Holidays: 07-07-2018 to 02-09-2018 vs 08-07-2017 to 03-09-2017

Easter Holidays: 01-04-2018 to 02-08-2018 vs 16-04-2017 to 17-04-2018

Christmas Holidays: 22-12-2018 to 6-01-19 vs 23-12-17 to 07-01-18

Please find attached workbook for the work I could do so far. It is not mandatory to represent data in the text table.

I am unable to compare Christmas holidays because there we have to compare 2018-2019 vs 2017-2018. The comparison includes the combination of 2 years.

It would be a great help if I can get any lead to this problem.

Regards,