Forum Discussion
what's wrong with adding the below column?
- 10 years ago
Hi. You are in a Power Query editor (where you can edit the data from sources before loading it).
There you need to user Power Query (M) language.
So you have 2 ways to create Year.
1) In Power Query editor use = Date.Year([Date])
2) load data (home - close & load), then create a new column using DAX - there you can use formula you tried (sorry for russian):
- 10 years ago
That is because you are using a wrong syntax.
I will rename your Date column in question to SalesDate, the correct formula will be: Date.Year([SalesDate])
For more info, these are the date functions that you can use in M
Hi. You are in a Power Query editor (where you can edit the data from sources before loading it).
There you need to user Power Query (M) language.
So you have 2 ways to create Year.
1) In Power Query editor use = Date.Year([Date])
2) load data (home - close & load), then create a new column using DAX - there you can use formula you tried (sorry for russian):
- alihijazi10 years agoHelper I
got the below error; it didn't work for me!
Please advise
- SabineOussi10 years agoSkilled Sharer
That is because you are using a wrong syntax.
I will rename your Date column in question to SalesDate, the correct formula will be: Date.Year([SalesDate])
For more info, these are the date functions that you can use in M