Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Split Text into rows using DAX

Hi power BI expert,   I need to split into rows using DAX instead of using Power Query due to performance (the data is too large). For info, previously i was using Power Query but I'm keep getting ...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    2 years ago

    Hi,

    Thank you for your message.

    Please check the below and the attached file whether it suits your requirement.

     

     

     

    Table V2 = 
    VAR _gt =
        GENERATESERIES ( 1, 100, 1 )
    VAR _t =
        ADDCOLUMNS (
            Data,
            "@separator", SUBSTITUTE ( Data[List of Students], ",", "|" )
        )
    VAR _generatetable =
        GENERATE ( _gt, ADDCOLUMNS ( _t, "@Name", PATHITEM ( [@separator], [Value] ) ) )
    RETURN
        FILTER (
            SELECTCOLUMNS (
                _generatetable,
                "@ClassName", Data[Class Name],
                "@StudentName", [@Name]
            ),
            [@StudentName] <> BLANK ()
        )