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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
elcamino
Frequent Visitor

Agregate distinctive values of one column sorted by another one

Hello everybody,

 

I have this table, let's call it table1. I want to create a new column, that I called column_that_I_want. This column should aggregate the distinctive Rates per Code, and should be sorted by Type. Therefore, if for the same code i have 2 different Rates, such as 7 and 2, these should be agregrated and separated by a comma and in percentage format. Additionally, the order they appear should depend on the values of Type. If Type is 2 for Rate 2 and code 1, and if Type is 1 for Rate 7 and code 1, the order should be 7.00%, 2.00%.

 

Thanks in advance

 

 

elcamino_0-1741874194513.png

 

1 ACCEPTED SOLUTION
elcamino
Frequent Visitor

I was able to solve it 

column_that_I_want =
VAR CurrentCode = Table1[Code]
RETURN
CONCATENATEX(
FILTER(
SUMMARIZE(
Table1,

Table1[Code],
Table1[Rate],
Table1[Type]
),
Table1[Code] = CurrentCode
),
FORMAT(Table1[Rate], "0.00%"),
", ",
Table1[Type],
ASC
)

View solution in original post

3 REPLIES 3
elcamino
Frequent Visitor

I was able to solve it 

column_that_I_want =
VAR CurrentCode = Table1[Code]
RETURN
CONCATENATEX(
FILTER(
SUMMARIZE(
Table1,

Table1[Code],
Table1[Rate],
Table1[Type]
),
Table1[Code] = CurrentCode
),
FORMAT(Table1[Rate], "0.00%"),
", ",
Table1[Type],
ASC
)

Anonymous
Not applicable

Hi @elcamino ,

 

If the problem has been solved, please consider accepting your response as a solution, which will help more people in need.

 

 

Best regards,

Mengmeng Li

Thanks.

 

Done.

 

Best regards

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors