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
Tony_Kuiper
Helper I
Helper I

how to create a multiple value column from rows for grouping benefit

Hi there... I have a table that I would like to change the layout on as far as summarising a column.

client_id, milestone_name, date

abc, first milestone, 01/01/2022

abc, second milestone, 01/01/2022

abc, third milestone, 02/01/2022

abc, fourth milestone, 03/01/2022

abc, fifth milestone, 03/01/2022

I can work out the elapsed time before each milestone change, but would like to view the data as

client_id, date, milestones

abc, 01/01/2022, {first milestone, second milestone}

abc, 02/01/2022, {third milestone}

abc, 03/01/2022, {fourth milestone, fifth milestone}

 

I cannot remember how to do this. I've been trawling through functions, but I'm not connecting the dots.

 

Tony

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi, @Tony_Kuiper 

Here are the steps you can refer to :

(1) This is my test data which is the same as yours:

vyueyunzhmsft_0-1664516942727.png

(2)If you want to create a table , you can click "New Table" and enter :

Table = SUMMARIZE('Sheet1','Sheet1'[client_id],'Sheet1'[date] , "name" , CONCATENATEX( DISTINCT( VALUES('Sheet1'[milestone_name])) , [milestone_name] , ","))

Then we can meet your need , the result is as follows:

vyueyunzhmsft_1-1664517002641.png

 

(3)If you want to show in the visual ,you can create a measure :

Name = CONCATENATEX( DISTINCT( VALUES('Sheet1'[milestone_name])),'Sheet1'[milestone_name] ,  ",")

Then we put the measure and the field we need in the visual and we can meet your need, the result is as follows:

vyueyunzhmsft_2-1664517073042.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi, @Tony_Kuiper 

Here are the steps you can refer to :

(1) This is my test data which is the same as yours:

vyueyunzhmsft_0-1664516942727.png

(2)If you want to create a table , you can click "New Table" and enter :

Table = SUMMARIZE('Sheet1','Sheet1'[client_id],'Sheet1'[date] , "name" , CONCATENATEX( DISTINCT( VALUES('Sheet1'[milestone_name])) , [milestone_name] , ","))

Then we can meet your need , the result is as follows:

vyueyunzhmsft_1-1664517002641.png

 

(3)If you want to show in the visual ,you can create a measure :

Name = CONCATENATEX( DISTINCT( VALUES('Sheet1'[milestone_name])),'Sheet1'[milestone_name] ,  ",")

Then we put the measure and the field we need in the visual and we can meet your need, the result is as follows:

vyueyunzhmsft_2-1664517073042.png

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

ppm1
Solution Sage
Solution Sage

If you just need to view it like that in a table/matrix visual, you can use an expression like this

 

List of Milestones = CONCATENATEX(VALUES(Table[Milestone_Name]), Table[Milestone_Name], ", ")

 

Pat

 

Microsoft Employee

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.