How to Create a Calendar Heatmap

This post is a guide on how to create a Calendar Heatmap visual in PowerBI


A calendar heatmap displays data in a calendar format where each cell represents a day, and the color intensity shows the activity level for that day. This visualization is perfect for showing patterns across days, weeks, and months.

Here is step by step guide to create a calendar heatmap using our heatmap visual.


Data Requirements

Your dataset should contain at least two columns:

  • Date: The date of the activity
  • Value: Any numeric metric you want to visualize

Import Heatmap Chart visual in PowerBI

The first step is to import Heatmap visual in Power BI. You can acquire heatmap visual from:

  • standalone pbiviz downloaded file from the website
  • or from AppSource
  • or as a part of your suite purchase deployed in organization repository

Once you decide the source of acquisition, you can import the visual following this documentation


Create WEEK_OF_MONTH Calculated Column

  • Create a calculated column WEEK_OF_MONTH that shows week of the month:


    WEEK_OF_MONTH = 1 + WEEKNUM ('Table'[Date])-WEEKNUM(STARTOFMONTH('Table'[Date]))
    

    It's data type and format should be Whole number.


Add Fields to the visual

  • Map WEEK_OF_MONTH to the Vertical Axis of the visual.
  • Map the Date field to the Tooltip.
  • Create a New visual calculation with following DAX formula:
    Weekday Name = FORMAT([Date], "ddd")
    
  • Once created, map Weekday Name field to Horizontal Axis.
  • Map Value to the Color Value field.
  • Add Month of the date to Small Multiples. This will create individual heatmap for each month.

Once completed, your mappings will look like this:

Data Fields mapping

Apply Sorting

To display calendar month tiles and weeks in order, you need to apply following sorting:

  • Apply PowerBI sorting to provide Date values in ascending order:

    Heatmap Sorting

  • Open the sorting dialog from the top-left corner of the visual, Go to Axes Tab and apply 'Sun,Mon,Tue,...' order for Horizontal axis. (more)

    Heatmap Sorting


Formatting

  • Color axis: Select the required color scale from Color axis -> Color -> Color Scale. If you want to define your custom colors for color scale you can do so by defining your colors in Color axis -> Custom color.

    Color formatting

  • Horizontal axis: Set the Layout -> Position to Top.

    Horizontal axis

  • Vertical axis:

    • Invert axis is switched on.
    • Toggle Off Vertical axis to hide it.
    • Update axis bounds so that it does not interfere with month labels.

    Vertical axis

  • Small multiple: Configure Small multiple properties under Format visual -> Small multiple:

    • Direction is Left to right.
    • Set the Max Rows/Columns to 3.
    • Set Labels to Bold, Horizontal align to Center and Vertical align to Top.

    Small multiple

  • Scroll: Enable Vertical scroll under Chart -> Scroll behavior

    Scroll formatting


Result

This configuration will create a calendar heatmap where:

  • X-axis represents days of the week (Mon, Tue, Wed, etc.)
  • Y-axis represents week numbers within the month (1, 2, 3, 4, 5)
  • Color intensity shows the level of value for each day
  • Multiple months can be displayed using small multiples

Calendar Heatmap


← blogs