Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Reusable calendar - with additional data loaded from local data source.

Hi all ,  thanks for any help.

Previously I have had either a calendar built with power query as part of the model, but when I tried to use that in the service it didnt allow an scheduled data load of the other data from local sql servers? Are the two not allowed? So I left that solution.

 

Then I tried a locally held sql calendar to overcome the not liking the power query in the scheduled upload - this would work - but it means I upload a lot of data.

 

Would the best solution be a really long calendar locally on sql containing all possible dates and any additional columns that must be gotten from local data. This gets uploaded and then dax or power query widens this into other columns like month name , year and month etc. Dax at least would not interfer with the scheduled refresh?

 

So the upload from sql is still long (and cut to start and end dates in the model as part of the load) , but at least is as narrow as possible and is widened again as part of the load.

 

Just trying to come up with the most efficient and easily resuable way of getting a calendar into multiple power bi models? Am i right in the data refresh restriction?

 

Any pointers greatfully received? Thanks

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, If you do not have a Date table in your data source, you can create such a table directly in the data model by adding calculated columns to a table built by using either CALENDAR or CALENDARAUTO. These functions return a table of one column of Date data type. For example, CALENDARAUTO automatically finds the minimum and maximum year of all the date columns included across the whole data model, and generates all the dates included between these years.

 

https://docs.microsoft.com/en-us/dax/calendar-function-dax

https://docs.microsoft.com/en-us/dax/calendarauto-function-dax

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks - I could yes use calandarauto - and then join in my local date data to this table. But would there be a way to share this- rather than having to do it over in ever differant model?

 

Thankyou

amitchandak
Super User
Super User

Just my thoughts

If your SQL calendar is all sorted with the calculation you need, you can always use that. Another way is to get a pbix created with only a calendar table with all needed calculations and then use a copy of that for any new model. For already in use. You may have to move the calculations.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks - how would I use a copy of a calendar pbix - I cant connect to two power bi datasets can I? Thanks

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.