Forum Discussion
MagnusJ
9 years agoFrequent Visitor
Concatenating text items into sequences based on previous rows
I have a problem that I have been attempting to solve through various approaches but it is slightly too complex for me. Not even sure if the best solution is through DAX or by using Power Query. Pow...
- 9 years ago
I'm sure what MarcelBeug suggests works! :smileyhappy:
However you don't need to create another table to achieve this
You just need a single Measure
Sequence MEASURE = IF ( HASONEVALUE ( 'Table'[Customer number] ), CONCATENATEX ( 'Table', 'Table'[Brand], "-> " ) )Here's the result
If you do want to create another table on the Modeling tab click New Table and type...
Summary Table = SUMMARIZECOLUMNS ( 'Table'[Customer number], "Sequence of Ownership", CONCATENATEX ( 'Table', 'Table'[Brand], "-> " ) )Here's this result...
Hope this helps! :smileyhappy:
MagnusJ
9 years agoFrequent Visitor
Excellent solutions! Thank you! I went with the summarizecolumns-solution to be able to use the concatenated strings as an axis in a chart or as a legend. Power Query-solution would also be possible of course. All in all an interesting problem with what looks like simple solutions once you see it, but it was impossible for me to crack. Expertise was needed! Thanks!