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

View all the Fabric Data Days sessions on demand. View schedule

Reply
acbi
Frequent Visitor

Listagg para bi

Oi, eu tenho uma tabela que segue mais ou menos o seguinte exemplo:

ReferênciaSKUCorTam
C24B023123456AzulP
 654321AzulM
 789101VerdeM
 111098VermelhoM
V43G560138743RoxoG
 382984BrancoG

Mas com uma infinidade de Referências

E preciso que seja feita uma coluna a mais que una todas as cores. Esperado:

ReferênciaCoresTamanhos
C24B023Azul, Verde, VermelhoP, M
V43G560Roxo, PretoG

A coluna de produtos pode desaparecer ou ter com apenas uma linha preenchida nas colunas "Cores" e "Tamanhos" para cada referência (por exemplo, a linha que começa em ordem alfabética)

Sei que na linguagem SQL poderia utilizar a função LISTAGG, mas não consegui encontrar nada semelhante a isso no Bi, seja no Power Query, uma nova coluna, tabela ou medida

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @acbi ,

 

According to your description, you can use the CONCATENATEX function. Refer to the following result.

Tab_ =
SUMMARIZE (
    'Table',
    'Table'[Referência],
    "Cors", CALCULATE ( CONCATENATEX ( 'Table', 'Table'[Cor] ), ALL ( 'Table' ) ),
    "Tam", CALCULATE ( CONCATENATEX ( 'Table', 'Table'[Tam] ), ALL ( 'Table' ) )
)

vhenrykmstf_0-1644891710501.png


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


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-henryk-mstf
Community Support
Community Support

Hi @acbi ,

 

According to your description, you can use the CONCATENATEX function. Refer to the following result.

Tab_ =
SUMMARIZE (
    'Table',
    'Table'[Referência],
    "Cors", CALCULATE ( CONCATENATEX ( 'Table', 'Table'[Cor] ), ALL ( 'Table' ) ),
    "Tam", CALCULATE ( CONCATENATEX ( 'Table', 'Table'[Tam] ), ALL ( 'Table' ) )
)

vhenrykmstf_0-1644891710501.png


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@acbi , ConcatenateX you can try

 

a measure  = ConcatenateX (Table, Table[Cor] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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