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 below PBI file consisit only master calendar from Mr Amit working fine :-
https://www.dropbox.com/s/klm9zz8q80xlhps/preWebinarPostCal_PY_DATA%20V004.pbix?dl=0
I cannot make use of above master calendar PBI file to import my sales order raw data file , The date unable to convert to text.
I seek advise how to import master calendar to my PBI file ?
Hope some one can share with me.
Paul Yeo
Solved! Go to Solution.
maybe you can try this to create a new calendar table. However, you need to do some modification since it may be now 100% suitable for your real business.
Dates =
ADDCOLUMNS (
CALENDAR (date(2020,1,1), date(2020,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"FinancialYear", IF (MONTH ( [Date]) < 7, YEAR ( [Date]), YEAR ( [Date]) + 1),
"FinancialPeriod", IF (MONTH ( [Date]) < 7, MONTH ( [Date]) + 6, MONTH ( [Date]) - 6),
"YYYY-MM", FORMAT ( [Date], "YYYY" ) & "-" & FORMAT ( [Date], "MM" ),
"Monthnum", MONTH ( [Date]),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"MonthofYear", FORMAT( [Date], "mmmm-yyyy")
)
Proud to be a Super User!
maybe you can try this to create a new calendar table. However, you need to do some modification since it may be now 100% suitable for your real business.
Dates =
ADDCOLUMNS (
CALENDAR (date(2020,1,1), date(2020,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"FinancialYear", IF (MONTH ( [Date]) < 7, YEAR ( [Date]), YEAR ( [Date]) + 1),
"FinancialPeriod", IF (MONTH ( [Date]) < 7, MONTH ( [Date]) + 6, MONTH ( [Date]) - 6),
"YYYY-MM", FORMAT ( [Date], "YYYY" ) & "-" & FORMAT ( [Date], "MM" ),
"Monthnum", MONTH ( [Date]),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"MonthofYear", FORMAT( [Date], "mmmm-yyyy")
)
Proud to be a Super User!
Hi Ryan
CALENDAR (date(2020,1,1), date(2020,12,31)),
May i ask you for the above line of code , it is mean that during 2021 Jan 1 , i need to manually modify the above date ?
If your answer is Yes , it there any way can make it dynamic ?
you can use DAX, something like below
calendar(min(table[salesdate]),max(table[salesdate]))
or use calendarauto
https://docs.microsoft.com/en-us/dax/calendarauto-function-dax
Proud to be a Super User!
Hi Sir
You are right , i need to create master calendar then import it since it is not so diffcuilt.
Paul
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |