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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 


@ 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!:
The Definitive Guide to Power Query (M)

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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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