Forum Discussion

user1112's avatar
user1112
New Member
1 year ago
Solved

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...
  • Elena_Kalina's avatar
    Elena_Kalina
    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.