10 Replies Latest reply on Apr 2, 2018 5:28 AM by Michael Hesser

# Educational Brain Teaser -- Calendar Creation

For all you double-digit Tableau-Level Gurus: take a break, put your feet up, and let some of the Community newcomers take a try at this introductory Educational Brain Teaser.

For those remaining, your mission-- should you choose to accept it-- create an interactive "wall calendar" for 2018 that looks like something this:

For fun,

• Grey out the weekends
• Mark any Friday the 13th so you know to stay in bed that day!

To help, you'll have this simple list of 2018 dates (but if you can reproduce it without using the file, I'll be impressed!).

This isn't too difficult, so if you've never participated in an Educational Brain Teaser, this is your chance!

Enjoy-- Michael

• ###### 1. Re: Educational Brain Teaser -- Calendar Creation

hi, Michael.

I'm not good at english, but challenged from Japan.

I like puzzles and quizzes, so I enjoyed this EBT.

Although I can not change the name of the month to English notation anyway, I decided not to mind.

I guess this is correct...

• ###### 2. Re: Educational Brain Teaser -- Calendar Creation

Looks good! Can you attach your work so others can see how you did it?

• ###### 3. Re: Educational Brain Teaser -- Calendar Creation

thanks!

i attached it to my previous reply.

i want to know better method too!

• ###### 4. Re: Educational Brain Teaser -- Calendar Creation

Wonderful job, Seiichiro Murakami! I posted this challenge for several reasons:

#1 There's the simple exposure to playing with dates in Tableau. To complete this exercise, you'll probably need to use of MONTH, WEEKDAY, and DAY to break up the year into its respective parts and label your boxes, not to mention identify and color specific dates like Friday the 13th.

#2 Things get slightly trickier, though, when it comes to restarting the viz with the next month on the top row.  You did this through a very elegant calculation:

Week Number of Month

DATEPART("week",Calendar)

-

{

FIXED       DATETRUNC('month', [Calendar]):

MIN(DATEPART('week', [Calendar]))

}

"From the current calendar week number, subtract the minimum week number for that month."

This always gives us a value of 0 (for a month's days that fall in the very first week), through 4 and sometimes 5   which we can use as the hidden Row number for our calendar graph.

#3 But the super-secret reason I posted this is to get people thinking about how & if they could use a template like this in current vizzes: perhaps as not only as a visualization tool, but as a user interface?

Thank you again for your contribution!

--Michael

• ###### 5. Re: Educational Brain Teaser -- Calendar Creation

Hey Michael,

Here is my take (without the file).

It was fun.

Łukasz

1 of 1 people found this helpful
• ###### 6. Re: Educational Brain Teaser -- Calendar Creation

Awesome response, Łukasz Majewski !  This is much better anything I could have done, and frankly, I'm a little woozy trying to figure out all the parts

It doesn't rely on an expansive secondary table to make the dates

Offers user flexibility in selecting different date ranges

Includes option of changing Week Start

I didn't see options for moon phases, eclipses, or Friday the 13ths but this I think we can let that slide.

Could you explain how you are creating the Date Range?

• ###### 7. Re: Educational Brain Teaser -- Calendar Creation

It is really simple. Having 2 distinct dates we can trigger data

densification aka padding and produce all the days in between. The range is

determined by the parameter and it either takes current year or the two

dates from the other parameters. Everything else are just date calculations

anchored to a known Sunday (2000-01-02) or Saturday (2000-01-01).

1 of 1 people found this helpful
• ###### 8. Re: Educational Brain Teaser -- Calendar Creation

That's a great trick to have in your Tableau Utility belt-- one I'm sure I'll use multiple times. Thank you for sharing!

• ###### 9. Re: Educational Brain Teaser -- Calendar Creation

Hi again,

Moon phases and Easter Sundays added

Should cover full Gregorian Calendar (since Oct 15th 1582).

Tableau Public

Cheers,

Łukasz

2 of 2 people found this helpful
• ###### 10. Re: Educational Brain Teaser -- Calendar Creation

This is awesome, Łukasz Majewski!