Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
| Code | Code attached | Uniq |
| A | empty | 1 |
| B | C, E | 1 |
| C | B, E | 0 |
| D | empty | 1 |
| E | B, C | 0 |
| F | empty | 1 |
Solved! Go to Solution.
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
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
Hi there
working, thanks!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 41 | |
| 20 | |
| 19 |