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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.