Forum Discussion
PBI Column Based Unstructured Data Grouping
- Anonymous3 years ago
Hi pbin9_9 ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2)Click "Transform Data" to go to the Power Query editor, add index columns, click Apply and close.
(3) We can create a table.
Table 2 = var a=ADDCOLUMNS('Table',"groups",LOOKUPVALUE('Table'[Data],'Table'[Index],MAXX(FILTER('Table',[Index]<EARLIER('Table'[Index])&&CONTAINSSTRING([Data],"Group")),[Index]))) var b=ADDCOLUMNS(a,"Combine",IF(CONTAINSSTRING([Data],"Group"),BLANK(),[groups]&":"&[Data])) return SUMMARIZE(FILTER(b,[Combine]<>BLANK()),[Combine])(4) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi pbin9_9 ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2)Click "Transform Data" to go to the Power Query editor, add index columns, click Apply and close.
(3) We can create a table.
Table 2 = var a=ADDCOLUMNS('Table',"groups",LOOKUPVALUE('Table'[Data],'Table'[Index],MAXX(FILTER('Table',[Index]<EARLIER('Table'[Index])&&CONTAINSSTRING([Data],"Group")),[Index])))
var b=ADDCOLUMNS(a,"Combine",IF(CONTAINSSTRING([Data],"Group"),BLANK(),[groups]&":"&[Data]))
return SUMMARIZE(FILTER(b,[Combine]<>BLANK()),[Combine])
(4) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- pbin9_93 years agoRegular Visitor
Hi Anonymous ,
It's definetely working and the results what I want !
Thanks&Regards