Forum Discussion

AN2021's avatar
AN2021
Frequent Visitor
5 years ago
Solved

Substract column with a constant from another column

Hi, I want to calculate as follow: Minus "Value" for each bucket with "Value" from bucket 1 group by "Division" Division Bucket Value Dif A 1 7 0 (7 - 7) A 2 8 1 (8 - 7) A 3...
  • Fowmy's avatar
    Fowmy
    5 years ago

    AN2021 

    Try this code please:

    Difference = 
    Table3[Value]
    -
    CALCULATE(
        sum(Table3[Value]),
        Table3[Bucket] = 1,
        ALLEXCEPT(Table3,Table3[Division])
    ) 
  • themistoklis's avatar
    themistoklis
    5 years ago

    AN2021 

     

    It still works with new dimensions.

    See attached file.

     

    If you could share you file so as to have a look at it that would be great

     

     

  • AN2021's avatar
    AN2021
    5 years ago

    Oh my bad, yeap its work, thanks