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 want to make a new column in power query, and want to contanate a numeric column with extra text. I get an error when I try:
= Table.AddColumn(#"Added Custom1", "Custom.1", each Text.Combine({"Status", [ActivityID]}," " ))
or
= Table.AddColumn(#"Added Custom1", "Custom.1", each Text.Combine({"Status", Text.From[ActivityID]}," " ))
or
= Table.AddColumn(#"Added Custom1", "Custom.1", each Text.Combine({"Status", Number.ToText[ActivityID]}," " ))
I am open to suggestions!
My current work around is to change the data type to text, but this will cause issues later on
hi, @Anonymous
For two text column, you could use & to concatenate them.
In your case, you want to concatenate a numeric column with text, so use Number.ToText Function add aformula as Interkoubess
And if you want to add a space between two field? if so you could try this
Table.AddColumn(#"Added Custom", "Custom.1", each [Status]&" "&Number.ToText([ActivityID]))
Result:
If it is not your case, please share some data sample and expected output. Do mask sensitive data before uploading.
Best Regards,
Lin
Hi @Anonymous,
Try this :
Table.AddColumn(#"Added Custom1", "Custom.1", each [Status] & Number.ToText([ActivityID]))
I suppose [Status] is a column.
Ninter
It also works with free text.
Ninter
User | Count |
---|---|
73 | |
70 | |
38 | |
23 | |
23 |
User | Count |
---|---|
96 | |
94 | |
50 | |
42 | |
40 |