EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Power BI learn Power BI Calendar
 

Power BI Calendar

Priya Pedamkar
Article byPriya Pedamkar

Updated March 22, 2023

Power BI Calendar

 

 

Introduction to Power BI Calendar

Power BI DAX functions are just amazing and flexible to do many complex calculations. One of the things we can do with Power BI Desktop is by using the CALENDAR function we can create a calendar by mentioning the start and end date. Not only a manual calendar we can create a calendar from the data table as well. Ok, in this article we will take you through CALENDAR function in Power BI.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

What does CALENDAR Function do in Power BI?

CALENDAR is a DAX function that can be used to create a calendar table in Power BI based on the starting date and ending date provided. So this is as simple as this, below is the syntax of CALENDAR function.

Syntax of Power BI Calendar

To create a calendar we need dates so we need to provide Start Date & End Date. For example, if you want to create a calendar for the month of Aug 2019 then the start date will be “01st Aug 2019” and the end date will be “31st Aug 2019”.

One more thing we need to worry about this Calendar function is while providing the start date and end date we cannot simply enter the dates as usual rather we need to make use of DATE function to give Year, Month, and Day separately.

How to Use Calendar Function in Power BI?

Below are the different examples to use Calendar function in Power BI:

Power BI Calendar – Example #1

  • For example assume we need to create a Calendar for the month of Aug 2019, in Power BI under the “Modeling” tab click on the “New Table” option.

New Table option Example 1-1

  • This will ask you to name the table, name it as “Aug 2019 Calendar”.

Power BI Calendar Example 1-2

  • Now Open Calendar DAX function.

Power BI Calendar Example 1-3

  • Since we are creating a Calendar for the month of Aug 2019, we need to provide the Start Date so our start date will be “01st Aug 2019”, so to enter this date we need to use DATE DAX function.

Power BI Calendar Example 1-4

  • For this DATE DAX function we need to enter Year, Month, and Day parameters. So enter Year as 2019, Month as 08, and Day as 01.

Power BI Calendar Example 1-5

  • The next argument is End Date so to provide end date open one more DATE function.

End Date Example 1-6

  • For this provide Year as 2019, Month as 08, and Day as 31.

Power BI Calendar Example 1-7

  • Ok, close two brackets and hit the Enter key to get the result.

Power BI Calendar Example 1-8

  • Here we have date columns starting from 01st Aug 2019 to 31st Aug 2019. One of the problems is it is not formatted properly, it is in the format of “MM-DD-YYYY” with time in front of it. So, change the format of this calendar as shown below.

Power BI Calendar Example 1-9

Now, the calendar format is in the form of “D MMMM, YYYY”.

Power BI Calendar – Example #2

We have seen how to make use of the CALENDAR function to create a calendar table by providing a start date and end date in Power BI. Imagine a scenario where we need to automatically create a calendar table from the actual data table. In such a case we cannot look at what is the least date and what is the highest date, so by using other DAX functions, we can automatically create a calendar.

So you can download the excel workbook from the below link which is used for this example.

You can download this Power BI Calendar Excel Template here – Power BI Calendar Excel Template

For example, we are going to use the below data table.

Power BI Calendar Example 2-1

  • This is a huge date table, so upload the same table to Power BI as well.

Power BI Calendar Example 2-2

  • From this table, we will create auto-calendar. Create a new table as shown in the previous example and open the CALENDAR DAX function.

CALENDAR DAX function Example 2-3

  • Here we need to use other DAX functions to get the Start Date from the table automatically, use MINX function to get the smallest date from the table.

MINX function Example 2-4

  • For this, first we need from which table we are getting the minimum date, so our table name is “Date_Table” so mention the same as Table name.

Date_Table Example 2-5

  • For Expression choose the “Date” column from the mentioned table.

Power BI Calendar Example 2-6

  • This will get the minimum date value from the table. Similarly, we need to get the End Date as well, so for this use MAXX function.

MAXX function Example 2-7

  • For this function, we need to mention the table name and expression as a date column.

Power BI Calendar Example 2-8

  • Ok, that’s all close two-bracket and hit enter to get the new calendar table.

Power BI Calendar Example 2-9

Like this, we can create calendar tables by using the CALENDAR function.

NOTE: Power BI Calendar file can also be downloaded from the link below and the final output can be viewed.
You can download this Power BI Calendar Template here – Power BI Calendar Template

Things to Remember

  • By default we get date & time together, so we can change the formatting at any point in time.
  • If you are using the CALENDAR DAX function means you have to insert a new table, not as the new column in the existing table.

Recommended Articles

This is a guide to Power BI Calendar. Here we discuss how to use a Calendar DAX Function to create a calendar table based on the starting date and ending date provided in Power BI along with practical examples. You may also look at the following articles to learn more –

  1. How to Create Power BI Reports?
  2. Power BI vs Excel (Top 19 Differences)
  3. Power BI Tutorial (How to Import data?)
  4. Power BI IF Statement

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Power BI Calendar Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

Download Power BI Calendar Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW