Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Index match Duplicate

Hi All

Il make this simple to understand

I have a data - for example Name and Location 
Each time a duplicate name appears down the row -indicate person most recent location.
For example 

Name        Location
John 1         Milan   
John 1        London

in excel i use the index match function - as the Match(fx) will bring me John 1 (row level 2 (most recent entry))

how do i trnslate it into PBI - :)

  • Hi Anonymous,

    Have you solved your problem?

    If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

    If you still need help, please feel free to ask.

    Best Regards,

    Cherry

     

3 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

     

    I still have a little confused about your requirement. 




    in excel i use the index match function - as the Match(fx) will bring me John 1 (row level 2 (most recent entry))



     

    If it is convenient, could you share your desired output so that I could understand your logic better and get the solution.

     

    Best  Regards,

    Cherry

  • Nishantjain's avatar
    Nishantjain
    Continued Contributor

    You will need a third row that you can use to find the latest entry. In Excel, you can use the row but in Power bi, you don't have that. 

     

    You can add it in two ways

     

    1. In Power Query, add an index column. Make sure you sort your data in the right order before you add the index column

     

    2. Better still, you can use another column such as date. 

     

    Next, use the third column to identify the last entry using max/ rankx function ( or something similar). 

     

    Thanks

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous,

    Have you solved your problem?

    If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

    If you still need help, please feel free to ask.

    Best Regards,

    Cherry