Sharing my Power BI template: Calendar Query aka Date Table
A frequent question in our Power BI User Group meetings is about using a Date table in Power BI and how to create one. Use this template to create a query named “Calendar” that includes your fiscal year dimensions. Follow the instructions in the pdf to set up your workbook for successful time series analysis.
There are many resources for Date tables online, some in M Query, some in DAX. But I have struggled to find a plug-and-play solution with a dynamic date range.
This example dynamically calculates the start date of the Calendar dimension based on the first day of the earliest fiscal year found in your Gifts[date] (or other field of your choice). It dynamically calculates the end date to be the last day of the current fiscal year.
Required connections:
The M Query code in the CalendarQuery.txt file can be applied to any data source, but if you are an RENXT user who has the Power BI Connector set up already, you can also use the .pbit file to apply to your own data.
Suggested skill level: Beginner
Configuration details: This .pbit (template) file should connect immediately to your installed Power BI connector, populating with your NXT data. Note: this template queries Gifts multiple times, which can take a long time on large data sets. The .pbit file is provided for your convenience, but is not required as you can follow the instructions to copy/paste script from the file CalendarQuery.txt.
If query run time becomes prohibitive, please see the attached pdf for alternatives to set-up start date without querying Gifts[date].
Comments
-
Here is an excellent walk through for using the DAX expression CALENDARAUTO() to create a calculated table for the date dimension.
Create calculated columns - Training | Microsoft Learn
CALENDARAUTO() identifies the minimum and maximum date value across all of your imported tables. Note that DAX creates a calculated table in Power BI Desktop, which is different from the template above, which uses power query language (M Code) in Power Query Editor.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 400 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 576 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 34 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 790 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)