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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Transform multiple statusChanges to a single entry (a list separated by delimiters, ordered by date)

Hi there!

I would like to transform table A to table B - DAX or Power Query, no specific preferences!

 

Table A
ChangedDateIDNewStatus
1-Jan-201Trial
3-Apr-201Subscribed
2-Jul-201Suspended
4-Feb-202Free
7-May-203Trial

 

to

 

Table B
IDJourney
1Trial, Subscribed, Suspended
2Free, Trial

 

Thank you in advance 🙂

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , try concatenatex

https://docs.microsoft.com/en-us/dax/concatenatex-function-dax

new measure

Journey = concatenatex(Table,Table[NewStatus])

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , try concatenatex

https://docs.microsoft.com/en-us/dax/concatenatex-function-dax

new measure

Journey = concatenatex(Table,Table[NewStatus])

Anonymous
Not applicable

@amitchandak  This worked perfectly as a New Column, thank you!

Anonymous
Not applicable

You can use powerquery to achieve this:

 

Group by ID

Jef_0-1593780228388.png

Select "all rows"

Jef_1-1593780312415.png

Add a column:

Table.AddColumn(#"Grouped Rows", "Custom", each Table.Column([Grouped], "NewStatus"))

 

Click expand on the new column, and select extract values

Jef_2-1593780390161.png

select comma

Jef_3-1593780417973.png

That's it, let me know if you need more help!

 

 

 

Anonymous
Not applicable

@Anonymous For some reason I end up with the correct answer, BUT all for the same ID... I think I'll go with concatenateX this time. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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