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
Paulyeo11
Impactful Individual
Impactful Individual

How to import master calendar table to my sales order table ?

Hi All

I have a sales order table . and i also have master calendar table which having 20 fields. now my sales order table with out master calendar . i can to add the master calendar . instead of manually add one by one . it there a way i can import all master calendar to my sales order table instead of manually add one by one.

Paulyeo11_0-1604825383992.png

 

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Paulyeo11 ,

 

Please let us know if @Fowmy 's reply is hepful.

 

 

Best Regards,

Icey

Fowmy
Super User
Super User

@Paulyeo11

If your calendar is in Excel, for example, you can import as you do with other Excel data. In addition

You can create a new calendar table with the following code, Go to Modeling Table. New table and paste, then change the date range as you need, you will have a calendar table with all the necessary fields.

Calendar = 
	ADDCOLUMNS(
		CALENDAR(date(2018,1,1),date(2021,12,31))
		,"Day Name",FORMAT([Date],"DDDD")
		,"Day of Week",(WEEKDAY([Date],1))
		,"Day of Month",DAY([Date]) 
		,"Week",DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))-(WEEKDAY([Date],1)-1)
		,"Week Name", "Week of " & DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))-(WEEKDAY([Date],1)-1)
		,"Week of Year", WEEKNUM([Date],1)
		,"Month", DATE(YEAR([Date]),MONTH([Date]),1)
		,"Month Name", FORMAT([Date],"MMMM")
		,"Month of Year", MONTH([Date])
		,"Month Year Name", FORMAT([Date],"MMM") & " " & YEAR([Date])
		,"Month Year Name Sort",(100*YEAR([Date])+MONTH([Date]))
		,"Quarter",DATE(YEAR([Date]),SWITCH(ROUNDUP(DIVIDE(MONTH([Date]),3,1),0),1,1,2,4,3,7,4,10),1)
		,"Quarter Name", "Q" & ROUNDUP(MONTH([Date])/3,0)
		,"Quarter Year Name", "Q" & ROUNDUP(MONTH([Date])/3,0) & " " & YEAR([Date])
		,"Year", DATE(YEAR([Date]),1,1)
		,"Year #",YEAR([Date])
	)

________________________

If my answer was helpful, consider Accepting it as the solution to help other members find it

Click the Thumbs-Up icon if you like this answer 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.