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.   
没有评论:
发表评论