Forum Discussion

peterso's avatar
peterso
Helper II
5 years ago
Solved

Divide with Filter

Hi guys,   Wondering how I can Divide with a filter - below is a dateset example. I'd like to divide the sum of B by the sum of C.   Expected result should be 37.5% - what is the best / most eff...
  • amitchandak's avatar
    5 years ago

    peterso ,

     

    Try like

    divide(calculate(sum(Table[value]),Table[Category]="B"),calculate(sum(Table[value]),Table[Category]="C"))

     

    or

    divide(calculate(sum(Table[value]),filter(Table,Table[Category]="B")),calculate(sum(Table[value]),filter(Table,Table[Category]="C")))