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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply

How to remove duplicates from calculated column

I have a calculated column which was created using RELATEDTABLE

NAMES=
CALCULATE(CONCATENATEX(RELATEDTABLE('TABLE'),
[NAME],
    ","
))
What I currently have
IDNAMES(CALCULATED COLUMN)
1A,A,B,C,D,D
2A,B,E,E,D,F,F
3A,A,S,S,D,F,H
4A,S,D
5A,A

 

What I need:

1A,B,C,D
2A,B,E,D,F
3A,S,D,F,H
4A,S,D
5A

 

Can you please let me know how to get distinct values for a calculated column.

 

Thank you!

 

 

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Try something like:

Unique IDs = CONCATENATEX(
    DISTINCT(SELECTCOLUMNS(RELATEDTABLE('Table'), "values", 'Table'[Value])), 
    [values], 
    ", "
)

 

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

Try something like:

Unique IDs = CONCATENATEX(
    DISTINCT(SELECTCOLUMNS(RELATEDTABLE('Table'), "values", 'Table'[Value])), 
    [values], 
    ", "
)

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.