Forum Discussion
user1112
1 year agoNew Member
Split Value
Hello, I have a table with multiple rows and columns and I want to split the value in one column by a delimiter (comma), I can't flatten the table because I have too many rows, I want to split dynami...
- 1 year ago
Hi user1112
Apologies for wasting your time by providing the incorrect formula. Perhaps this solution will help you:
1. Create a calculated table with just IDs and split values:
SplitRelationships = VAR SourceTable = SUMMARIZE(DataTable, DataTable[ID], DataTable[Tags]) RETURN ADDCOLUMNS( GENERATE( SourceTable, VAR ItemCount = PATHLENGTH(SUBSTITUTE([Tags], ",", "|")) RETURN GENERATESERIES(1, ItemCount, 1) ), "SplitValue", PATHITEM(SUBSTITUTE([Tags], ",", "|"), [Value], TEXT) )
2. Create relationships between this table and your dimension tables.
3. Use this table in visuals when you need to filter by split values.
If this post helps, then please don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you.
Elena_Kalina
1 year agoSolution Sage
Hi user1112
Try this:
SplitValues = VAR SelectedValue = SELECTEDVALUE(YourTable[ColumnToSplit]) VAR SplitArray = PATHITEMREPLACE(SUBSTITUTE(SelectedValue, ",", "|")) RETURN CONCATENATEX(SplitArray, PATHITEM(SplitArray, [Value]), ", ")