Forum Discussion

aszpic's avatar
aszpic
Frequent Visitor
9 years ago
Solved

Sum values only one time

Hello everyone,   I have a table with 2 columns: 'Code' and 'Values'. The Code can be repeated. The Values column is the same for each code, so 2 Values for 'CodeA' are equal to each other, and 2 ...
  • Sean's avatar
    9 years ago

    aszpic

     

    Here's the MEASURE that will do this for you...

     

    Measure =
    DIVIDE (
        SUM ( 'Table'[Value] ),
        CALCULATE ( COUNTA ( 'Table'[Code] ), ALLEXCEPT ( 'Table', 'Table'[Code] ) ),
        0
    )

     

     

    Good Luck! :smileyhappy: