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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic Calendar questions

Hi everyone!

 

I have some doubts to create a dynamic calendar from my data.

- Is it possible to create a Master calendar only with year and week of the year?

- How could I create a column with the "month" using the week of the year?

 

My data are like that:

Captura.PNG

 

Thanks!

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Would you please elaborate what does Dynamic Calendar mean? 

 

According to the two question, I created a date table via below steps. Please review it to see whether it is acceptable.

 

Create a new table named as Master Calendar from your source data table.

Master Calendar=
SELECTCOLUMNS ( 'Data Table', "Year", 'Data Table'[Year], "Week", 'Data Table'[Week] )

Create a date table with continual date values. And add three calculated columns [Year Column], [Month Column] and [Week Column]. 

Dim Table =
CALENDAR ( DATE ( 2007, 1, 1 ), DATE ( 2008, 12, 31 ) )

Year Column = 'Dim Table'[Date].[Year]
Month Column = 'Dim Table'[Date].[MonthNo]
Week Column = WEEKNUM('Dim Table'[Date])

 

Summarize the above table 'Dim Table'.

Dim Table 2 =
SUMMARIZE (
    'Dim Table',
    'Dim Table'[Year Column],
    'Dim Table'[Week Column],
    "Month Column", LASTNONBLANK ( 'Dim Table'[Month Column], 1 )
)

Then, in Master Calendar table, create a calculated column to display Month value.

Month =
LOOKUPVALUE (
    'Dim Table 2'[Month Column],
    'Dim Table 2'[Year Column], 'Master Calendar'[Year],
    'Dim Table 2'[Week Column], 'Master Calendar'[Week]
)

1.PNG

 

If I have something misunderstood, please correct me and provide more detailed description.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Would you please elaborate what does Dynamic Calendar mean? 

 

According to the two question, I created a date table via below steps. Please review it to see whether it is acceptable.

 

Create a new table named as Master Calendar from your source data table.

Master Calendar=
SELECTCOLUMNS ( 'Data Table', "Year", 'Data Table'[Year], "Week", 'Data Table'[Week] )

Create a date table with continual date values. And add three calculated columns [Year Column], [Month Column] and [Week Column]. 

Dim Table =
CALENDAR ( DATE ( 2007, 1, 1 ), DATE ( 2008, 12, 31 ) )

Year Column = 'Dim Table'[Date].[Year]
Month Column = 'Dim Table'[Date].[MonthNo]
Week Column = WEEKNUM('Dim Table'[Date])

 

Summarize the above table 'Dim Table'.

Dim Table 2 =
SUMMARIZE (
    'Dim Table',
    'Dim Table'[Year Column],
    'Dim Table'[Week Column],
    "Month Column", LASTNONBLANK ( 'Dim Table'[Month Column], 1 )
)

Then, in Master Calendar table, create a calculated column to display Month value.

Month =
LOOKUPVALUE (
    'Dim Table 2'[Month Column],
    'Dim Table 2'[Year Column], 'Master Calendar'[Year],
    'Dim Table 2'[Week Column], 'Master Calendar'[Week]
)

1.PNG

 

If I have something misunderstood, please correct me and provide more detailed description.

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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 for your help @v-yulgu-msft,

I have probed your solution and works fine.

 

When I said Dynamic Calendar I refer to a table that depend of my data. Starting with the oldest date of my data and finishing with the most recent.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.