Forum Discussion

benjaminlperry's avatar
benjaminlperry
Frequent Visitor
7 years ago
Solved

SUM removing duplicates

So I have a table with a list of inspections, and then another related table with a list of all violations associated with the inspections.  The inspection table and violation table are related via t...
  • Mariusz's avatar
    7 years ago

    Hi benjaminlperry 

    You can use the below expression.

    Total Inspection Points = 
    SUMX( 
        GROUPBY( 
            'Violation Table', 
            'Violation Table'[Report Number], 
            'Violation Table'[Violation Code], 
            'Violation Table'[ Violation Points] 
        ), 
        'Violation Table'[ Violation Points] 
    ) 

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski