Forum Discussion

Alta88's avatar
Alta88
Helper IV
4 years ago
Solved

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? 

 

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. 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Alta88 ,

     

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

    Before

     

    After

     

     

    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.

10 Replies

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

    • tamerj1's avatar
      tamerj1
      Community Champion

      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's avatar
    tamerj1
    Community Champion

    Hi Alta88 

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

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

     

  • tamerj1's avatar
    tamerj1
    Community Champion

    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 )

     

      • tamerj1's avatar
        tamerj1
        Community Champion

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Alta88 ,

     

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

    Before

     

    After

     

     

    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.