3 Replies Latest reply on Nov 2, 2017 7:49 AM by Branden Kornell

How to create a group of dates?

Hello Guys,

I have a data consisting of 3 years: 2015, 2016 and 2017.

I want to divide it into 3 groups:

1st Group:

• 2015

2nd Group:

• 2016
• First half of 2017 (January to June)

3rd Group:

• Second half of 2017 (July to December)

Can this be done in Tableau?

Thank you a lot guys,

Cheers,

• 1. Re: How to create a group of dates?

Yes this possible based on "Grouping";) Find approach in attached workbook version 10.3 located in the original thread

Regards,

Norbert

1 of 1 people found this helpful
• 2. Re: How to create a group of dates?

Hello Norbert,

But I still have an issue, I have so many records and dates and can not do it manually, it will take a long time.

Is there any simpler solution?

Thank you again,

• 3. Re: How to create a group of dates?

Try

IF YEAR([Date]) = 2015 then

"Group 1"

ELSEIF YEAR([Date]) = 2016 or

(YEAR([Date]) = 2017 and MONTH([Date]) <= 6) then

"Group 2"

ELSEIF YEAR([Date]) = 2017 and MONTH([Date]) > 6 then

"Group 3"

END

1 of 1 people found this helpful