Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello, I have below table and want to transform Column A to Column B with below output.
Basically, I want to remove all succeeding commas. I can do this in transform data however Column A is calculated in DAX and it's not present yet in transform data so I need a DAX to remove the succeeding commas.
Solved! Go to Solution.
@burrito , Use the below DAX
Column B =
VAR SplitString = SUBSTITUTE([Column A], ",", "|")
VAR StringTable = ADDCOLUMNS(
GENERATESERIES(1, LEN(SplitString) - LEN(SUBSTITUTE(SplitString, "|", "")) + 1),
"Element", PATHITEM(SplitString, [Value], TEXT)
)
VAR FilteredTable = FILTER(StringTable, [Element] <> "")
RETURN CONCATENATEX(FilteredTable, [Element], ",")
Proud to be a Super User! |
|
@burrito , Use the below DAX
Column B =
VAR SplitString = SUBSTITUTE([Column A], ",", "|")
VAR StringTable = ADDCOLUMNS(
GENERATESERIES(1, LEN(SplitString) - LEN(SUBSTITUTE(SplitString, "|", "")) + 1),
"Element", PATHITEM(SplitString, [Value], TEXT)
)
VAR FilteredTable = FILTER(StringTable, [Element] <> "")
RETURN CONCATENATEX(FilteredTable, [Element], ",")
Proud to be a Super User! |
|
User | Count |
---|---|
117 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |