top of page

Let's Talk About Dates Baby!

In my live demo this week called Dawn's Design Demos, I will review how to create a Date Picker (or selector) for a dashboard. The dashboard I will demo is here. You can watch this live session at 7 am EST on July 5th. It will also be recorded and located in my YouTube channel (techtipsgirl), my LinkedIn page or my twitter page (techtipsgirl).

Here is a print screen of my dashboard:

In previous blog post here I talk about creating date calculations. Recreate these and save these calculated fields! As a developer you will compare values of the max date to a prior month etc. I would save them in a word doc and use them over and over again.

One thing to note is that this blog post has the day granularity. You can always take out that last line such as "AND DATEPART('day',[Order Date])<=DATEPART('day',[Latest Date])" if you don't need the exact day of this month compared to the same day of the prior month.

In this other blog post I talk about how to create rolling sum calculations based on a Date Parameter. This is helpful because what if your client wants to see a look back based on a date from a calendar?

The dashboard I refer to for the Date selection has a lot going on. I created the calendar selector by following the steps in Rajeev Pandey's blog post here. I don't want to go into too much detail to take away from Rajeev's blog. I just added more selections for Year and Month. I performed the below steps to create my visualization. 

My Steps that I will perform LIVE!

First I had to perform a little bit of Date Data Scaffolding. You may not know but the Sales Superstore data set does not have days for every day of the year. You need to add the dates that are missing for this exercise. I will not perform these steps live to save time.

I created the following parameters by right-clicking on Order Date and selecting the Date Data Type and select All for Allowable values

  • Date

I then created the below parameters as an integer data type;

  • Month

  • Year

I created Custom Dates for Months, Week Numbers and Years. You can do this by right-clicking on Order Date and selecting Create > Custom Date.

I then created the following Calculated fields;

  • Date (Weekdays)

  • Date List

Then I right-clicked on Date List to create a Parameter. I just select All for Allowable values.

I also changed my Group by to Folder in my Data pane so I could organize my calculated fields by folders. I created three folders, one called Date Calcs, one called Selection Calcs and one for Configuration.

I then created some more calculated fields using the Date field below;

  • Date1

  • Date2

  • Start Date

  • End Date

  • Date Range

Then I created the following calculated fields for selection;

  • All Dates Selected

  • Selected Date

  • Selected Month

  • Selected Year

  • Selected Period Label

  • Selected Period Tooltip

  • Selected Day Color

I also created the below calculated fields for removing the highlight later;

  • TRUE


I also created my other charts to put on the dashboard. Which I won't cover here. If you want to create the line chart, refer to my blog here for enhancing a line chart.

Now I needed to create the visuals. I created the Year selection worksheet first as shown below;

Then I needed to create the below two calculated fields for formatting for my Calendar view;

  • Columns

  • Rows

I added these to my Configuration folder.

I then created the calendar view as shown below;

I then hid the headers in this sheet.

Next, I needed to create the calendar view;

Without having any of the dashboard actions in play, I have one color for the calendar. I needed to start adding these views to a dashboard and adding the Parameter actions in order to change the colors.

I created Parameter actions for the Year, Month and Calendar Dates.

Once these were applied, the calendar now had three colors! I changed them as shown below;

I could also now create a sheet specifying what the Start Date and End Dates are.

This is similar to what Lindsey Poulter had in her dashboard here.

This is just a walk through of the steps I performed to create this dashboard. I will do these steps live which you can watch in the channels I specified in the beginning of this blog.


bottom of page