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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
pollyog
Advocate I
Advocate I

Calendar for each ID field?

Hi everyone!

 

I need to create some kind of dinamically calendar. What do I mean? I have a dimension table (with project IDs), where each project have a start and end date. So, I need to have one calendar per project, each one starting and ending in the defined date. This is because in each calendar I'll have to calculate the progress based in the points that each project have.

 

So, I was wondering about how to implement this solution in the best performance way possible. Any ideas?

 

Thankss!!

5 REPLIES 5
Greg_Deckler
Super User
Super User

CALENDAR function will do this.

 

https://msdn.microsoft.com/en-us/library/dn802546.aspx

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi Smoupre, thanks. But I think I didn't explain it good. O know the calendar function, that I cand use a start and end date to create the table values. The question is, I need to have one calendar for each project ID in my Project table because for each project I will have to calculate some other information in the calendar table. But I would like to do it in a good performance way.

Hi @pollyog,

Based on my understanding, each project in your table have a start and end date, you will create a canlendar table based on each project's start and end date, right? If it is, you will create many canlendar tables because there are many projects, and every calendar is different. There is no better way to create mutiple table at once, you have to create them one by one.

Best Regards,
Angelia

Yes, I have a table with start and end date for each project. I was thinking about create a calendar like this:

 

ProjectID     date

P1                startDate

P1                startDate + 1

P1                ...

P1                endDate

P2                startDate

P2                startDate + 1

P2                ...

P2                endDate

 

Any ideas of how I could achieve it?

 

Thanks!

I think that the issue here is that you have jumped forward to what you believe to be the solution to your problem and asking how to do it without any of the background information required rather than presenting some sample raw data, relationships, etc. and then explaining what you are trying to accomplish. See:

 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

I'm not clear on the need for separate calendar tables and have a hard time believing that is really the solution but I do not know enough about the source data, real issue or the extra things you are trying to calculate, etc. to really be of any help.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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