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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
prb
Frequent Visitor

partial match combined with first occurence

Hi Colleagues,

 

I would like to solve the following issue below. Could You please help me how would You do it in PBI?

 

there are uniq codes in first column, and for some instances (where in code attached column is not "empty"), there are some attached codes. e.g. if for code B the C and E is attached, it means the same value. I would like to create a uniq column and mark the ones with 1 if it is uniq, and with 0 for ones that are attached to one already marked as uniq. i.e. in this case, B, C and E are attached, so I would like to mark only B as uniq as it was the first occurence, subsequent C and E should be marked as not uniq.

 

thanks in advance,

prb

 

CodeCode attached Uniq
Aempty1
BC, E1
CB, E0
Dempty1
EB, C0
Fempty1
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@prb 

 

You may add a custom column in Query Editor.

let
    s = ", "
in
    Text.Combine(List.Sort(List.Combine({{[Code]}, Text.Split([#"Code attached "], s)})), s)

https://community.powerbi.com/t5/Desktop/IF-AND-dax-Formula/m-p/293991#M129654

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@prb 

 

You may add a custom column in Query Editor.

let
    s = ", "
in
    Text.Combine(List.Sort(List.Combine({{[Code]}, Text.Split([#"Code attached "], s)})), s)

https://community.powerbi.com/t5/Desktop/IF-AND-dax-Formula/m-p/293991#M129654

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there

 

working, thanks!

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.