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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Custom Date Table - period description

hi, 

I work in the rail industry.

We have for example:

Period 1 = 01/04/2021 to 01/05/2021

Period 2 = 03/05/2021 to 29/05/2021

 

  • I have a basic date table (below is my current date table code)
  • How can i add Period 1 (Decscription) to incorporate this date periods only?

 

 

Date =
ADDCOLUMNS (
FILTER (
CALENDARAUTO( ),
AND ( YEAR ( [Date] ) >= 2021, YEAR ( [Date] ) <= 2026 )
),
"Calendar Year", "CY " & YEAR ( [Date] ),
"Month Name", FORMAT ( [Date], "mmmm" ),
"Month Number", MONTH ( [Date] ),
"Weekday", FORMAT ( [Date], "dddd" ),
"Weekday number", WEEKDAY( [Date] ),
"Quarter", "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1
)

 

 

Thank you

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , do you have any table where you have these periods if yes you can add additional columns based on that

 

Start Date  = minx(filter(period, peiord[Start Date] <= Date[Date] && peiord[end Date] >= Date[Date] ), peiord[Start Date] )

 

same way

 

 

end Date  = minx(filter(period, peiord[Start Date] <= Date[Date] && peiord[end Date] >= Date[Date] ), peiord[end  Date] )

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

Hi amitchandak
Where in my code, would i insert the code you suggested?

Thanks

Jerry

Anonymous
Not applicable

I dont have any other table.

This is a new contract.

What do you suggest?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.