Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Fake duplicate in Table (link between 3 tables)

Hello,

 

I am struggling with my table and with what I call "fake duplicates". I have 3 tables that feed my pbi table (report) but I have seen multiple line where I am supposed to have only one. 

below the 3 table with Data Product as a key, only Definition tables as unique data product, we have duplicates on the two others:

 

Table in report:

I have multiple data product lines displayed with little difference on value for some fields.

 

So I would like to have, for one data product groupe, only one line per data product.  

 

If you have some ideas, I willing to try them.

 

Thanks

  • Anonymous You can create a calculated column to filter only latest records. Use the belox DAX and apply "Yes" to the filter. This will filter only the latest record for each product name.

    Is Latest ? = 
    var a = CALCULATE( MAX('Definition'[Last Change Date]), ALLEXCEPT('Sample','Sample'[Data Product Name]))
    RETURN
    IF('Definition'[Last Change Date] = a , "Yes", "No")

     

    Did I answer your question ? Please mark my post as a solution.

     

    Thanks,

    Jai

     

3 Replies

  • Anonymous You can create a calculated column to filter only latest records. Use the belox DAX and apply "Yes" to the filter. This will filter only the latest record for each product name.

    Is Latest ? = 
    var a = CALCULATE( MAX('Definition'[Last Change Date]), ALLEXCEPT('Sample','Sample'[Data Product Name]))
    RETURN
    IF('Definition'[Last Change Date] = a , "Yes", "No")

     

    Did I answer your question ? Please mark my post as a solution.

     

    Thanks,

    Jai

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks Jai-Rathinavel but I cannot use your solution, I dont have a date to filter and I think my duplicates came from the links between tables... but I dont know what is the issue

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, Anonymous 

    You can remove duplicates in a table in Power Query Editor before you load the data into Power BI. Select the column that defines a unique row and use the Remove Duplicates feature.

     

    How to Get Your Question Answered Quickly

    Best Regards

    Yongkang Hua

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