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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Output of Unique Name from Set of Data

Hello, 

 

I would like to create a column which has only unquire "Names" from "Name Column" within a set of "Number Columns".

 

For example, with this input: 

 

NumberName
1Bob
1Jeff
1Bob
1Ryan
2Ace
2

Bob

2Ryan


I would like to see this output: 

NumberNameUnquie Name in Set
1Bob

Bob

1JeffJeff
1Bob 
1RyanRyan
2AceAce
2

Bob

Bob

2RyanRyan

 

Please note that I want a duplicate "Name" output to be reported if with in a new "Number" set

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

First you need to add the index column in Power Query.

 

image.png

 

Then try the following formula:

 

Unquie Name in Set = 
VAR _Min = 
    CALCULATE(
        MIN('Table'[Index]),
        FILTER(
            'Table',
            'Table'[Number] = EARLIER('Table'[Number])
                && 'Table'[Name] = EARLIER('Table'[Name])
        )
    )
RETURN IF('Table'[Index] = _Min, 'Table'[Name])

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

First you need to add the index column in Power Query.

 

image.png

 

Then try the following formula:

 

Unquie Name in Set = 
VAR _Min = 
    CALCULATE(
        MIN('Table'[Index]),
        FILTER(
            'Table',
            'Table'[Number] = EARLIER('Table'[Number])
                && 'Table'[Name] = EARLIER('Table'[Name])
        )
    )
RETURN IF('Table'[Index] = _Min, 'Table'[Name])

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-kkf-msft ,

 

Thank you so much for your reply and your assistance. 

 

To stream line this processs, I used the file you attached. 

 

I treid to enter the data into a "Custom Column" forumla (maybe that is not the right place to put the code?)

and was met with many "Token Eof expected" errors. The first beging at the first line. 

Please help me sort out what I am doing wrong. 

 

Thank you in advance! 

 

MissElektronika_1-1626108636039.png

 

 

Hi @Anonymous ,

 

"Unquie Name in Set" is a calculated column. So after you create the Index column, you need to close the Query Editor window and apply changes. Then select this table, click New Column, and enter the formula.

 

vkkfmsft_0-1626144145125.png

image.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-kkf-msft:

 

I absolutely cannot thank you enough. Thank you so so so very much! 

Thank you not only for your solution but being patient with me and explaining where I should be inputting the formula.

Thank you!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.