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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX Assistance: How to Reference another Row with Duplicate Value

Hi, 

 

Urgent help required please if possible. I've attempted to find solution myself for hoursss, but not been able to. 

 

I have two columns in Power BI, which I will use to create a new column for my desired output (Move Type column). 

Column 1 (Type)

Column 2 (Delivery Number)

 

Desired Output (Move Type column) 

Delivery NumberTypeNew Move TypeDuplicate?
305865793LargeLarge & CasesTrue
305865793CasesLarge & CasesTrue
305865791LargeLargeFalse
305865757CasesCasesFalse
305865753LargeLarge & CasesTrue
305865753CasesLarge & CasesTrue
305865726LargeLarge & CasesTrue
305865726CasesLarge & CasesTrue
305865718LargeLarge & CasesTrue
305865718CasesLarge & CasesTrue
305865716LargeLargeFalse
305865715LargeLarge & CasesTrue
305865715CasesLarge & CasesTrue
305865676LargeLarge & CasesTrue
305865676CasesLarge & CasesTrue
305865669LargeLarge & CasesTrue
305865669CasesLarge & CasesTrue
305865647LargeLargeFalse
305865635LargeLarge & CasesTrue
305865635CasesLarge & CasesTrue
305865197LargeLargeFalse

 

IF [Delivery Number] is a duplicate, then I want to check the [Type] for all those individual duplicate Delivery Numbers

IF any of the [Type] for the duplicate Delivery Numbers is "Cases", then I want the [New Type] to return "Large & Cases" for all those Delivery Numbers. 

 

Unfortunately, I see no option to upload PBIX file

 

Thanks in advance

Matt

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

Those are for creating new columns.

 

Untitled.png

 

New Move Type CC = 
CONCATENATEX (
    FILTER ( data, Data[Delivery Number] = EARLIER ( Data[Delivery Number] ) ),
    Data[Type],
    " & ",
    Data[Type], DESC
)

 

Duplicate CC = 
COUNTROWS (
    SUMMARIZE (
        FILTER ( data, Data[Delivery Number] = EARLIER ( Data[Delivery Number] ) ),
        Data[Type]
    )
) <> 1

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This is exactly what I was looking for. Thank you so much

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

Those are for creating new columns.

 

Untitled.png

 

New Move Type CC = 
CONCATENATEX (
    FILTER ( data, Data[Delivery Number] = EARLIER ( Data[Delivery Number] ) ),
    Data[Type],
    " & ",
    Data[Type], DESC
)

 

Duplicate CC = 
COUNTROWS (
    SUMMARIZE (
        FILTER ( data, Data[Delivery Number] = EARLIER ( Data[Delivery Number] ) ),
        Data[Type]
    )
) <> 1

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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