8
How to: Display Daily Data in a Calendar View
How to: Display Daily Data in a Calendar View
When you are working with Daily Data it will sometimes make sense to display the information in a Calendar view. Here you will find a way to tweak a Grid View into the look and feel of a calendar.
Tweaking a grid into calendar view
First let us give you instructions on how to tweak the grid view – below you will also find a video that shows the steps life in a Data Model. The steps for creating a calendar view:
In the Model:
Create a measure for day of month (Max)
Create a measure for week number (Max)
Create a measure for weekday number (max)
Create a measure for date (max)
In Formulate:
- Create a measure called “checkers for calendar” with the following formula (you can use the wizard, no need to code):
([Measue: Week] + [Measure:Day Of Month]) %2 -0.5 + If(DateFormat(Date(),”YYYY-MM-dd”) = left([Measure: Date],10) ,3,0)
What the first row in this measure does, is it takes the modulo 2 of the week and the day – A Modulo operator returns the integer remainder of a division (7%2 = 1, 6%2 = 0).
So the first part of this calculation sums the week and the day (Tuesday week 34 is 36) and returns the remainder from division by 2 - which is either 1 or 0. This will make each month the "checkers board" look. we reduce 0.5 so it's either -0.5 or +0.5.
The second part is checking weather the current date (calculated from the date() function) is the date of the current cell (which the left 10 characters of the date measure) - thus Today will get the value 3.5 or 4.5.
In Discover:
- Create a grid
- Put the weekday on the columns
- Put the week on the rows
- Add the day of month measure
- Add additional measures you want to show
- Put the values chip on the rows.
- Select the day of month measure, and align left, and bold
- Other formatting as desired
- Add the checkers measure to the color pane – set color to fixed,
select 3 bands, -1 to 0, 0 to 1, 1 to 5. - Remove gridlines
- Remove row headers
- Minimize rows width
- Set rows text and background to transparent
- Remove readability and auto colorize.
- You can make further changes as you wish.
Tips & Tricks Video
To make this even easier. Please find this solution in a short video:
If you have any suggestion or feedback. Please Comment below.
Reply
Content aside
- 8 Likes
- 1 yr agoLast active
- 226Views
- 2 Following
Related Articles