EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials PowerBI Tutorial Power BI Calendar
Secondary Sidebar
PowerBI Tutorial
  • Advanced
    • Power BI Tutorial
    • KPI in Power BI
    • Power BI Calendar
    • Power BI Dashboard Samples
    • Power BI DAX
    • Power BI Filter
    • Power BI Icon
    • Slicers in Power BI
    • Power BI IF Statement
    • Power BI Template
    • Power BI Maps
    • Measures in Power BI
    • Power BI Report
    • Power BI SUMX
    • Power BI Charts
    • Power BI Pie Chart
    • Power BI Bullet Chart
    • Power BI Gantt Chart
    • Power BI Bubble Chart
    • Power BI Waterfall Chart
    • Power BI Drillthrough
    • Power BI Themes
    • Power BI Tooltips
    • Power BI Heat Map
    • Creating Reports in Power BI
    • Power BI Connections
  • Basic
    • What is Microsoft Power BI
    • Is Power BI Free?
    • Power BI Visuals
    • Power BI Parameters
    • Power BI Alternatives
  • Interview Questions
    • Power Bi Interview Questions

Related Courses

Power BI Certification Course

Business Intelligence Certification Course

Data Visualization Certification Course

Power BI Calendar

By Priya PedamkarPriya Pedamkar

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.

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.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

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.

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,060 ratings)

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
Popular Course in this category
Microsoft Power BI Training (6 Courses, 4 Projects)
  6 Online Courses |  4 Hands-on Projects |  45+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Business Intelligence Training (12 Courses, 6+ Projects)4.9
Data Visualization Training (15 Courses, 5+ Projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

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

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

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

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

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

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Power BI Calendar Excel Template

EDUCBA

Download Power BI Calendar Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more