Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

% calculation per row

Hello I'm trying to create a calculate column of cost % out of total cost with filters, attaching the pic below for example  I have two column that filtering my calc, the right column (cost %) is w...
  • Selva-Salimi's avatar
    Selva-Salimi
    1 year ago

    Anonymous 

     

    I think you forgot to write "Filter". so write it as follows:

    Product_Share = 'Sales'[Total Cost (Calc)] / CALCULATE(SUM('Sales'[Total Cost (Calc)]),Filter ('Sales','Sales'[Month] = EARLIER('Sales'[Month]) && 'Sales'[Product_Group (Calc)] = EARLIER('Sales'[Product_Group (Calc)]))

     

    * I highlight updated part*

     

    If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly.