Forum Discussion

User5231's avatar
User5231
Helper II
6 years ago
Solved

How to Sum Distinct Based on another Column Value

So I am trying to make a measure that sums a column, but sums it distinctly based on criteria. Order Operation Yield Area ID1 1 1 area1 ID1 2 1 area2 ID1 3 1 area3 ID2 1 1 area1 ID2 2 1 area2 ...
  • parry2k's avatar
    6 years ago

    User5231 try this measure:

     

    Yield Sum = 
    CALCULATE ( 
        SUM ( TableTest[Yield] ),
        FILTER ( 
            ALLEXCEPT ( TableTest, TableTest[Area], TableTest[Order] ), 
            TableTest[Operation] = MAX ( TableTest[Operation]  )
        )
    )
    

     

    I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!