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.
Hi There,
Can anyone help me with combining rows in a column?
I want the data to be the same in all the other columns.
Example: (Combine Office Column)
Name | Office | Phone |
Doug | OH | 111 |
Matt | PA | 222 |
Steve | IN | 333 |
Doug | MO | 111 |
Matt | OH | 222 |
Steve | CA | 333 |
Doug | IN | 111 |
Matt | MI | 222 |
Steve | MO | 333 |
Formatted to look like this:
Name | Office | Phone |
Doug | OH, MO, IN | 111 |
Matt | PA, OH, MI | 222 |
Steve | IN, CA, MO | 333 |
Thanks!
Solved! Go to Solution.
Hi,
Try these measures
=CONCATENATEX(VALUES(Data[Office]),Data[Office],",")
=min(Data[Phone])
Hope this helps.
Hi,
Try these measures
=CONCATENATEX(VALUES(Data[Office]),Data[Office],",")
=min(Data[Phone])
Hope this helps.
Hi @Dexter1088 ,
Like this? Learned this from Matt Allington's book.
Proud to be a Super User!
Maybe I'm doing it wrong, but when I do that I get this
Name | Office | Phone | Combined Office |
Doug | OH, MO, IN | 111 | OH, PA, IN, MO, CA, MI |
Matt | PA, OH, MI | 222 | OH, PA, IN, MO, CA, MI |
Steve | IN, CA, MO | 333 | OH, PA, IN, MO, CA, MI |
It just shows all the possibilites on every row. Thanks!
Hi @Dexter1088 ,
Are you building this in a measure, and if so what are you using to display this? I used your original data to build my table in Power BI. I then created the measure from above and added it to the matrix shown above turning off the subtotals to get that picture. How are you trying to display this?
If you are trying to place this in the original data table, it won't work as it violates data rules having one piece of data in each cell.
If this solves your question, please mark it as the solution.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |