Forum Discussion
YearMonth Column
- 4 years ago
You will need to use following
= FORMAT(DATE(YEAR('Calendar'[Year]),'Calendar'[Month Number],1),"MM-YYYY")In your YEAR column, you have used STARTOFYEAR which gives a date. But in DATE, it needs a number for YEAR. YEAR('Calendar'[Year]) provides that year number.
Second problem was that you were using month name as second argument for Date whereas it needed a number 1-12 which should have been provided through 'Calendar'[Month Number].
Use this
Year Month = FORMAT('Calendar'[Date],"MM-YYYY")- koorosh4 years agoPost Partisan
Where is the problem with the following, please ?
MonthYear = FORMAT(DATE('Calendar'[YEAR],'Calendar'[Month Name],1),"MM-YYYY")- Vijay_A_Verma4 years agoMost Valuable Professional
You will need to use following
= FORMAT(DATE(YEAR('Calendar'[Year]),'Calendar'[Month Number],1),"MM-YYYY")In your YEAR column, you have used STARTOFYEAR which gives a date. But in DATE, it needs a number for YEAR. YEAR('Calendar'[Year]) provides that year number.
Second problem was that you were using month name as second argument for Date whereas it needed a number 1-12 which should have been provided through 'Calendar'[Month Number].