Forum Discussion
DAX Replace repetitive string with one string
Hi Everyone,
I have a column with the click flow of a user on a specific day:
BUT, When activities repeat themselves, it becomes impossible to visualise or group the data. I would like to replace repetitive strings (activities) with one single string:
| What I have | What I want |
| ClickFlowColumn | ClickFlowColumn |
| click , click, preview, insert, insert, insert | click, preview, insert |
| click, search, search, search, preview | click, search, preview |
Dax only please, because this is a calculated column.
Some help would be much appreciated!
Anonymous
What do you change your formula like this?ClickFlowColumn = CALCULATE ( CONCATENATEX ( VALUES ( ActivitiesTable[Activity Type] ), ActivitiesTable[Activity Type], ", " ), ALLEXCEPT ( ActivitiesTable, ActivitiesTable[UserId], ActivitiesTable[Date] ) )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
6 Replies
- vanessafvgCommunity Championhave you tried use the contcatenex function?
CONCATENATEX(VALUES(Table1[Column1]),[Column1])- AnonymousNot applicable
- FowmySuper User
Anonymous
What do you change your formula like this?ClickFlowColumn = CALCULATE ( CONCATENATEX ( VALUES ( ActivitiesTable[Activity Type] ), ActivitiesTable[Activity Type], ", " ), ALLEXCEPT ( ActivitiesTable, ActivitiesTable[UserId], ActivitiesTable[Date] ) )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
- amitchandakSuper User
Anonymous , three functions in power query should to it
Text.Split
https://docs.microsoft.com/en-us/powerquery-m/text-splitList.Distinct
https://docs.microsoft.com/en-us/powerquery-m/list-distinctText.Combine
https://docs.microsoft.com/en-us/powerquery-m/text-combine- AnonymousNot applicable
amitchandak thank you, but I'm working with calculated columns, so unfortunately Power Query won't solve my problem.