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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
romovaro
Responsive Resident
Responsive Resident

CONCATENATE different rows

HI Pbix community and Happy Friday,

 

I need help with a Formula. I have a customer table and every customer has small entitites based in different countries with different CUID number.

 

CID Client Name Country CUID
011050 Client A Germany 025679
011050 Client A Great Britain 025682
011050 Client A Hong Kong 025686
011050 Client A Indonesia 034152
011050 Client A Indonesia 057145
011050 Client A India 025687
011050 Client A India 382279
011051 Client B Singapore 025723
011052 Client C United Arab Emirates 025727
011052 Client C China 025728
011052 Client C Egypt 025729

 

I currently show the Count of Countries and Count of CUIDs included in the Client Name but I have been asked to provide in detail de Countries and CUIDS

 

romovaro_0-1669386252856.png

 

In that case, add an extra column with "Countries Included" and another one with "CUIDs included"

Example (From the first table),

Client A  should show

Countries included Germany, GB, Hong Kong, Indonesia & India 

Cuids included: 025679, 025682, 025686, 034152, 057145, 025687 & 382279

 

Client B  should show

Countries included Singapore 

Cuids included: 025723

 

I currently have a formula that provides the result I need but all the Services are in one row. In the Country and CUID case I have some issues with data in different rows.

 

Distinct Services =
CONCATENATEX(
FILTER(
SUMMARIZE('Sales File','Sales File'[Client_Name],'Sales File'[ServiceName]),'Sales File'[Client_Name]=EARLIER('Sales File'[Client_Name])
),
'Sales File'[ServiceName],
" & "
)
 
Thanks for your help,
 
1 ACCEPTED SOLUTION
romovaro
Responsive Resident
Responsive Resident

HI jgeddes,

 

NO worries. Tried again with the formulas and now is working. 

Thanks,

 
Distinct Countries =
CONCATENATEX(
FILTER(
SUMMARIZE('Weekly Slippage','Weekly Slippage'[Client Name],'Weekly Slippage'[Country]),'Weekly Slippage'[Client Name]=EARLIER('Weekly Slippage'[Client Name])
),
'Weekly Slippage'[Country],
" & "
)
 
 
Distinct CUIDs =
CONCATENATEX(
FILTER(
SUMMARIZE('Weekly Slippage','Weekly Slippage'[Client Name],'Weekly Slippage'[CUID]),'Weekly Slippage'[Client Name]=EARLIER('Weekly Slippage'[Client Name])
),
'Weekly Slippage'[CUID],
" & "
)
 
romovaro_0-1669626889393.png

 

 

View solution in original post

4 REPLIES 4
jgeddes
Super User
Super User

Can you show me what you mean by the countries and CUIDs are in different rows?





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

Proud to be a Super User!





romovaro
Responsive Resident
Responsive Resident

HI jgeddes,

 

NO worries. Tried again with the formulas and now is working. 

Thanks,

 
Distinct Countries =
CONCATENATEX(
FILTER(
SUMMARIZE('Weekly Slippage','Weekly Slippage'[Client Name],'Weekly Slippage'[Country]),'Weekly Slippage'[Client Name]=EARLIER('Weekly Slippage'[Client Name])
),
'Weekly Slippage'[Country],
" & "
)
 
 
Distinct CUIDs =
CONCATENATEX(
FILTER(
SUMMARIZE('Weekly Slippage','Weekly Slippage'[Client Name],'Weekly Slippage'[CUID]),'Weekly Slippage'[Client Name]=EARLIER('Weekly Slippage'[Client Name])
),
'Weekly Slippage'[CUID],
" & "
)
 
romovaro_0-1669626889393.png

 

 
jgeddes
Super User
Super User

Good Morning,

Using your formula I end up with

jgeddes_0-1669391800354.png

I am not sure that I understand where your issue is occuring. Can you elaborate as to what issue(s) you are seeing?

 





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

Proud to be a Super User!





romovaro
Responsive Resident
Responsive Resident

HI Jgeddes

 

I was just trying to provide an example of what I am looking for. The last formula is one you gave to me and it works perfectly. The concatenate formula is proving with all the services (all the services are in one row).

 

My problem now is that CUIDs and Countries are in different rows and the formula is not working.

You can forget about the last part with the "concatenate formula". it was just an example

 

Thnaks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors