Product:
Microsoft Power BI desktop
Issue:
How add a custom column with two text strings together?
Solution:
There are more than one why to do this, in the Transform data, you can add code like this:
Period = Table.AddColumn( #"Renamed Columns", "År - Månad", each Number.ToText ( [Year]) & " - " & Number.ToText ( [Month] ))
Where the #”Renamed columns” is the name of the previus step in the transformation.
“År – Månad” is the new name of the new column.
As the column YEAR is a integer, we need to convert it to text before we can use the & to put several text/string fields together.
Number.ToText only work in Power Query M.

In the report table tool you can use the & ” – ” & to put together two columns into a new column, as shown above.
Period = 'Val av Period'[År] & " - " & FORMAT ('Val av Period'[Månadsnr], "0#" )
Use FORMAT to get it as two digits in the month part.
To get the 3 left character of month name in a column called Month name;
Month Short = UPPER ( LEFT ( ‘calender table’ [Month Name] , 3 )
To get leading zeros on month, use code like this:
Month Number = Table.AddColumn(#”Renamed Columns”, “Number to Text”, each Number.ToText([Month] , “D2” ))
The “D2″ second parameter, tells that there should be two characters, and fill up with zero in result.
In Power Query, you can convert month column to show two digit numbers with;
Month Number = Text.PadStart(Text.From([Month]),2,”0″)
To convert a date column to only year and month use;
Period = Date.ToText([Date],”yyyy MMM”)
The CONCATENATE function joins two text values by directly appending the second string to the first, without any space or delimiter. Both input values must be of text data type. If numeric values are used, they will automatically be converted to text before concatenation.
New Column = CONCATENATE(“Hello”, “World”) , can also be written as;
New Column = “Hello” & ” ” & “World” , to get a space between the words.
You can also write it similare to this:
New Column = CONCATENATE ( “Hello” , CONCATENATE ( ” ” , “World” ) )
More Information:
https://lets-viz.com/blogs/dax-function-left/
https://blog.datumdiscovery.com/blog/read/extracting-text-made-easy-understanding-the-left-function-in-power-bi
https://lets-viz.com/blogs/dax-function-format/
https://lets-viz.com/blogs/dax-function-concatenate/
Microsoft Power BI with Desktop Training Course | Udemy
https://powerquery.how/number-totext/
https://datascientest.com/en/mastering-power-query-number-totext-a-comprehensive-tutorial-for-power-bi-users
https://www.spguides.com/power-bi-convert-number-to-text/
Merge columns (Power Query) – Microsoft Support
https://www.fourmoo.com/2015/03/25/power-query-adding-leading-zero-to-number-eg-month-number/
https://www.notjustaprettydashboard.com/how-to-create-single-letter-month-day-name-columns-in-power-bi/
https://radacad.com/generate-year-month-day-combinations-in-power-bi-report-using-power-query-date-totext-function/