2021年4月6日星期二

Expression.Error: The name 'CONCATENATE' wasn't recognized. Make sure it's spelled correctly

I want to extract month of year from datetime timestamp and create a new column in Power BI where I use DirectQuery.

I tried:

CONCATENATE(MONTH([Timestamp]),YEAR([Timestamp]))  

and caught error:

Expression.Error: The name 'CONCATENATE' wasn't recognized.  Make sure it's spelled correctly.  

According to Microsoft Docs Date.Month seems to work but it only extracts month data instead of year-month, there are other options such as WeekOfYear or WeekOfMonth but I could not find MonthOfYear?

I probably shouldn't use this as I found out that this is not suitable for Power Query(which I think need M formula language?) but just testing out:

FORMAT(table_name[Timestamp],"mmm-yyyy")  

and caught error:

Expression.Error: The name 'FORMAT' wasn't recognized.  Make sure it's spelled correctly.  
https://stackoverflow.com/questions/66978818/expression-error-the-name-concatenate-wasnt-recognized-make-sure-its-spell April 07, 2021 at 10:33AM

没有评论:

发表评论