Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Community,
I have a table instead of having a list of all Study_ID's, I'd like to have them in one row
Is that possible in Power BI?
Kind Regards
Solved! Go to Solution.
Hi @Janica123 ,
You can try to use this DAX to create a new calculated table:
NewTable =
SUMMARIZE(
'Table',
'Table'[Name],
"Concatenated IDs",
CONCATENATEX(
FILTER(
'Table',
'Table'[Name] = EARLIER('Table'[Name])
),
'Table'[ID],
","
)
)
The final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Janica123 ,
Here is the sample data:
Put this M function into Advanced Editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckxPVdJRMjE1MVKK1UFwTQ1QuGbmKFwLS2SumYEBKtdQKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, ID = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type number}}),
GroupedRows = Table.Group(
#"Changed Type",
{"Name"},
{
{"All_IDs", each Text.Combine(List.Transform(_[ID], each Text.From(_)), ","), type text}
}
)
in
GroupedRows
The final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Janica123 ,
You can try to use this DAX to create a new calculated table:
NewTable =
SUMMARIZE(
'Table',
'Table'[Name],
"Concatenated IDs",
CONCATENATEX(
FILTER(
'Table',
'Table'[Name] = EARLIER('Table'[Name])
),
'Table'[ID],
","
)
)
The final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, I see two ways here.
A) in power query you right-click on the first column and select unpivot other columns and then you merge the other columns with a ", " separator
B) you use Group by and adjust the function to concatenate. https://www.youtube.com/watch?v=eH3ezMimLY0&ab_channel=TechTARSolutions
Kudos and mark as solution appreciated.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.