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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Alta88
Helper IV
Helper IV

Duplicate Names in a List

I'm working on a ranking project and I have a list of sales rep names that features names that repeat over and over since each rep has several accounts they've installed. How do I get this table to show only 1 instance of each rep's name? 

 

Alta88_0-1658344130069.png

I tried linking the names from a master employee list to this table but the formulas aren't working for me; despite creating a relationship between them. Please advise. 

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

Hi @Alta88 ,

 

The easiest way is set the field to show the first.

Before

vstephenmsft_0-1658739113663.png

 

After

vstephenmsft_1-1658739136959.png

 

 

Best Regards,

Stephen Tao

 

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

10 REPLIES 10
v-stephen-msft
Community Support
Community Support

Hi @Alta88 ,

 

The easiest way is set the field to show the first.

Before

vstephenmsft_0-1658739113663.png

 

After

vstephenmsft_1-1658739136959.png

 

 

Best Regards,

Stephen Tao

 

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

tamerj1
Super User
Super User

@Alta88 

Another method. Place this measure in the filter pane, select "is not blank" and apply the filter

 

FilterMeasure =
VAR CurrentRepTable =
    CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[Sales Rep] ) )
VAR MinDate =
    MINX ( CurrentRepTable, TableName[Date] )
VAR FilteredTable =
    FILTER ( CurrentRepTable, TableName[Date] = MinDate )
RETURN
    COUNTROWS ( FilteredTable )

 

Apply that filter as a measure? 

@Alta88 

Oh I'm extremely sorry. I posted the wrong measure for another post. Please refer to the same comment updated with correct measure. 

Yes. But no need to place in the table, only in the filter pane

Alta88
Helper IV
Helper IV

Ok, so I tried that but it just gave me another column of account IDs.

Alta88_0-1658431377567.png

 

@Alta88 

Ok, now remove the old AcctID from the visual.

Alta88
Helper IV
Helper IV

Try 'By Date' since the installs occur on different days but often for the same Sales Rep. 

@Alta88 

First you slice only by SalesRep. Then you can add AcctID as a measure

CALCULATE ( SELECTEDVALUE ( TableName[AcctID] ), TableName[Date] = MAX ( TableName[Date] ) )

now the values of the other two columns will be aggregated. Maybe this not what you want but please try this and let's see what get then tell me what exactly your requirement is. 

tamerj1
Super User
Super User

Hi @Alta88 

how do you define "first instance"? By date? By index? By a certain sort order? Or any one will be just fine?

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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