Forum Discussion

CostaBella's avatar
CostaBella
Frequent Visitor
2 years ago
Solved

Remove Duplicates

I have a report that I am working on that shows active Projects on Hurricane Evacuation routes. I use a slicer containing all the districts and counties. There are 3 tables connected to the slicer, 1. Contract and Project Information, 2. Agency Personnel Contact Information, and 3. Emergency Contact Information for each Contractor. At first when there is nothing specified in the slicer, the Emergency Contractor Contact Information has duplicates; not because there are duplicates in the database, but because one contractor can be assigned to multiple contracts/projects (this is essentially the same thing happening with the Agency Contact Information table because multiple districts and counties are assigned to one Engineer). Is there a way to remove the duplicates in one or more tables before the criteria in the slicer is selected? Then after that if a contractor is assigned to multiple projects in different districts, I am fine with it showing duplicates at that point. Apologies if this is a confusing question, but I have tried all I know to fix this issue.

  • Which visual are we talking about? Tables will only show duplicates if there is something different on the rows that it is showing, so if you have a table with the project ID and contact info, it will show one row per project ID with the associated contact info. If you removed project ID from the table, it would only show one row for the contact info for each contact. 

     

    You could use the slicer setting to force a user to select a value before data is displayed, maybe? Or remove the unique fields from the visual. Or use a matrix to group on the field that is causing the duplication for some visual separation. 

3 Replies

  • christinepayton's avatar
    christinepayton
    Most Valuable Professional

    Which visual are we talking about? Tables will only show duplicates if there is something different on the rows that it is showing, so if you have a table with the project ID and contact info, it will show one row per project ID with the associated contact info. If you removed project ID from the table, it would only show one row for the contact info for each contact. 

     

    You could use the slicer setting to force a user to select a value before data is displayed, maybe? Or remove the unique fields from the visual. Or use a matrix to group on the field that is causing the duplication for some visual separation. 

    • CostaBella's avatar
      CostaBella
      Frequent Visitor

      Thank you for the advice! Could you please explain how to go about setting up 2 of the 3 tables to wait to display data until criteria in the slicer is selected? I'm sort of new at Power BI so still learning what all it can do.

      • CostaBella's avatar
        CostaBella
        Frequent Visitor

        NVM! Quick DAX formula and I got it working!

         

        Thank you for your help!