Forum Discussion
jtkrause14
2 years agoNew Member
Removing Comma after calculated column
I am working with a matrix and created a calcaluted column for a value. The column concatenates all the companies that are in the related to the rows/columns of the matrix with a comma and a line bre...
- Anonymous2 years ago
Hi jtkrause14
I’m sorry to hear that you can’t removing Comma after calculated column, I'll give you another way to do it:
Here's some dummy data
Select "Transform data" to enter the power query
Select “customerA” and “customerB”, and select “Group By” in the “Transform”
Select “Sum” and “Fully_Qualified_Name”
Modify the code
= Table.Group(#"Changed Type", {"customerA", "customerB"}, {{"CompanyName", each Text.Combine([Fully_Qualified_Name], ","), type nullable text}})Here is the result, and select “Close & Apply”
View in Desktop
Best Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Fowmy
Super User
2 years agojtkrause14
Change the -1 in this formual to 2 if necessary
CompanyNames =
var __m =
CALCULATE (
CONCATENATEX (
VALUES('Customer'[Fully_Qualified_Name]),
'Customer'[Fully_Qualified_Name] & ", " & UNICHAR(10),
""
)
)
var __result = left( __m, len(__m)-1)
RETURN
__result
- jtkrause142 years agoNew Member
I get this error when I try to use the left function:
- Fowmy2 years ago
Super User
Try this please:
CompanyNames = var __m1 = CALCULATE ( CONCATENATEX ( VALUES('Customer'[Fully_Qualified_Name]), 'Customer'[Fully_Qualified_Name] & ", " & UNICHAR(10), "" ) ) VAR __m = CONVERT ( __m1 , STRING ) var __result = left( __m, LEN(__m)-1) RETURN __result- jtkrause142 years agoNew Member
Still getting the same error.