Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to concatenate a number column and a text column into a new column - so for example Column [Year] 2019 will be concatenated with Column [FiscalMonth] Jan to make a new column called CustomNew that contains 2019Jan. Year column is the number and FiscalMonth is the text column.
I have tried a number of things but always end up with an error in the new column.
I am currently trying Add Column -> Custom Column which produces this Power Query -
= Table.AddColumn(#"Changed Type1", "CustomNew", each Number.ToText[Year] & [FiscalMonth]).
I end up getting the error -
Expression.Error: We cannot apply field access to the type Function.
Details:
Value=[Function]
Key=Year
Does anyone have any ideas as to why I'm getting this error or any other way of doing this?
Many thanks.
Solved! Go to Solution.
@Anonymous
Please try add brakets for year column.
= Table.AddColumn(#"Changed Type1", "CustomNew", each Number.ToText([Year]) & [FiscalMonth]).
Proud to be a Super User!
Hi @Anonymous ,
Please try the following M query:
= Table.AddColumn(#"Changed Type", "Custom", each Text.Combine({Text.From([Year], "en-US"), [FiscalMonth]}), type text)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous
Please try add brakets for year column.
= Table.AddColumn(#"Changed Type1", "CustomNew", each Number.ToText([Year]) & [FiscalMonth]).
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |