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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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