Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX Replace repetitive string with one string

Hi Everyone,


I have a column with the click flow of a user on a specific day: 

ClickFlowColumn = CALCULATE(CONCATENATEX(ActivitiesTable, ActivitiesTable[ActivityType], ", "), ALLEXCEPT(ActivitiesTable, ActivitiesTable[UserId], ActivitiesTable[Date]))


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 haveWhat I want
ClickFlowColumnClickFlowColumn
click , click, preview, insert, insert, insertclick, preview, insert
click, search, search, search, previewclick, search, preview

 

Dax only please, because this is a calculated column.

 

Some help would be much appreciated!

1 ACCEPTED SOLUTION

@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] )
)

Fowmy_0-1598529538176.png

 

________________________

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 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

have you tried use the contcatenex function?
CONCATENATEX(VALUES(Table1[Column1]),[Column1])




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hi @vanessafvg 

 

That worked!

@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] )
)

Fowmy_0-1598529538176.png

 

________________________

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 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy  That worked! Thank you! 

amitchandak
Super User
Super User

@Anonymous , three functions in power query should to it

 

Text.Split
https://docs.microsoft.com/en-us/powerquery-m/text-split

List.Distinct
https://docs.microsoft.com/en-us/powerquery-m/list-distinct

Text.Combine
https://docs.microsoft.com/en-us/powerquery-m/text-combine

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak thank you, but I'm working with calculated columns, so unfortunately Power Query won't solve my problem.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors