Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago
Solved

Expand lists without duplication

Hi everyone, I'm not sure how to approach a situation, I'm creating a report where I upload 2 sharepoint lists, one of them is a list of customers and the other is each customer's management. The problem is that in both tables there are list-type fields that I need to expand in PowerBI, and when I expand it the rows are duplicated, of course being sharepoint lists they have an associated id and that I can take the count of differentiated ids, but I need to relate both tables, and when doing this it is left with a many-to-many relationship which is what I want to avoid, How could I address this?

2 Replies

  • Hi Syndicate_Admin 
    It seems that you just need to remove duplicates from the list of customers with PQ and create a one-to-many relationship with the second table.

    If I am missing something 

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
    Please show the expected outcome based on the sample data you provided.

    https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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

  • Hello

    Thank you very much for the help, the problem is another, I will detail a little more, when expanding a data type List creates a new row if the list has more than one item, therefore the row is not duplicated as such, but if there is an id column, it is shown 2 times. As a consequence of the above, if I have 2 tables, in both tables I must perform the same "expand list" management, and I want to make the relationship, yes or if it remains as a many-to-many relationship and that is what I want to avoid.

    Momentarily create the relationship in a new lookup table before expanding the lists and then expanding the lists, although they are still duplicated, but I can count the different ids, the problem is solved, but I don't think it is the most "optimal" it takes longer to load and make any changes