Forum Discussion

davidz106's avatar
davidz106
Helper III
4 years ago
Solved

Dividing within the same column

Hi,   I have a table with 4 columns ID           Factor   Component Quantity name1    1                    A                   0,5 name1    0                    B                   2 name1    1...
  • Anonymous's avatar
    Anonymous
    4 years ago

    davidz106 UPDATED - check this out.

     

     

    Percentage_ = 
    VAR DValue = CALCULATE(SUM('Divide'[Quantity]),FILTER(ALLEXCEPT('Divide','Divide'[ID]),'Divide'[Component] ="D"))
    RETURN
    IF(SUM('Divide'[Factor]) = 1,SUM('Divide'[Quantity])/DValue,0)

     

     

     

     

    Accept the solution if it fulfills your need.