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
katyfailoo
Advocate I
Advocate I

Return Unique values from concat two columns

I have this formula (Tables are masked) in which returns concatenated values for two columns in Table A that unfortunately does not return unique values. Would someone be able to assist on how this can be written so that my results are unique?

 

Combined Values =

CALCULATE(CONCATENATEX(, 
FILTER(
'Table_A',
'Table_A'[Key]
IN VALUES('Table_B'[Key])
),
'Table_A'[Column_1]&" - "&'Table_A'[Column_2],
";"& UNICHAR(10),
'Table_A'[Column_1], ASC
), ALL('Table_A'))

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @katyfailoo 

please try

Combined Values =
CALCULATE (
    CONCATENATEX (
        DISTINCT (
            SELECTCOLUMNS (
                FILTER ( 'Table_A', 'Table_A'[Key] IN VALUES ( 'Table_B'[Key] ) ),
                "@_1", 'Table_A'[Column_1],
                "@_2", 'Table_A'[Column_2]
            )
        ),
        [@_1] & " - " & [@_2],
        ";" & UNICHAR ( 10 ),
        [@_1], ASC
    ),
    ALL ( 'Table_A' )
)

View solution in original post

katyfailoo
Advocate I
Advocate I

Thank you so much! @tamerj1 this solution works. Can't thank you enough for your time and help!

View solution in original post

2 REPLIES 2
katyfailoo
Advocate I
Advocate I

Thank you so much! @tamerj1 this solution works. Can't thank you enough for your time and help!

tamerj1
Super User
Super User

Hi @katyfailoo 

please try

Combined Values =
CALCULATE (
    CONCATENATEX (
        DISTINCT (
            SELECTCOLUMNS (
                FILTER ( 'Table_A', 'Table_A'[Key] IN VALUES ( 'Table_B'[Key] ) ),
                "@_1", 'Table_A'[Column_1],
                "@_2", 'Table_A'[Column_2]
            )
        ),
        [@_1] & " - " & [@_2],
        ";" & UNICHAR ( 10 ),
        [@_1], ASC
    ),
    ALL ( 'Table_A' )
)

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.