Forum Discussion

srkase's avatar
srkase
Helper IV
7 years ago
Solved

CALCULATE PERCENTAGE

Hi    I have created a matrix table in the following manner   branch product spares %       chennai 10000 500 ?                         ? I want to create the perc...
  • Mariusz's avatar
    7 years ago

    Hi srkase 

     

    Try this.

    % of Spares = 
    VAR _products = CALCULATE(
        SUM( YourTable[TOTAL QTY] ), 
        YourTable[CATEGORY] = "PRODUCT"
    )
    VAR _spares = CALCULATE(
        SUM( YourTable[TOTAL QTY] ), 
        YourTable[CATEGORY] = "SPARES"
    )
    RETURN DIVIDE( _spares, _products )

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski