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.
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
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 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |