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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Not applicable

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.