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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
romovaro
Responsive Resident
Responsive Resident

Retrieve text from column (Sort of Distinctcount for text)

HI all,

 

Tried to find a solution but couldn't find one.

I have a column with Client Name and a column called "Service Name" where all services contracted are included.

 

In the example below, Client A has 3 different "Service Name" ---> Service 1, Service 2 and Service 3

 

Client_Name RollCall_Date SegmentName ServiceName
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 2
Client A 01-mar-22 Majors Service 2
Client A 01-mar-22 Majors Service 2
Client A 01-mar-22 Majors Service 2
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 1
Client A 01-mar-22 Majors Service 3
Client A 01-mar-22 Majors Service 3
Client A 01-mar-22 Majors Service 3
Client A 01-mar-22 Majors Service 3

 

Currenly and using "distinc Count" I can show how many Services are included x customer.

 

romovaro_0-1664531743789.png

 

What I would like to do is create a new column where the names of the different services appear in text, not just the number. But I am not sure if this is possible.

 

IN this case, next to the #ServiceName column showing the different services contracted, another one showing which services.

Service 1 & Service 2

Service 1 & Service 3

Service 1, service 2 & Service 3, etc.

 

Thanks

 

@jgeddes 

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

I was able to find a solution from @v-juanli-msft that should work for you.

 https://community.powerbi.com/t5/Desktop/Concatenate-multiple-row-values-into-one-based-on-unique-ID... 

In your case the calculated column would be written as

Distinct Services =
CONCATENATEX(
    FILTER(
        SUMMARIZE(clientTable,clientTable[Client_Name],clientTable[ServiceName]),clientTable[Client_Name]=EARLIER(clientTable[Client_Name])
    ),
    clientTable[ServiceName],
    " & "
)
Hope this helps.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
jgeddes
Super User
Super User

I was able to find a solution from @v-juanli-msft that should work for you.

 https://community.powerbi.com/t5/Desktop/Concatenate-multiple-row-values-into-one-based-on-unique-ID... 

In your case the calculated column would be written as

Distinct Services =
CONCATENATEX(
    FILTER(
        SUMMARIZE(clientTable,clientTable[Client_Name],clientTable[ServiceName]),clientTable[Client_Name]=EARLIER(clientTable[Client_Name])
    ),
    clientTable[ServiceName],
    " & "
)
Hope this helps.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors