The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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! |
|
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
73 | |
47 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
56 |