Forum Discussion

harirao's avatar
harirao
Icon for Post Prodigy rankPost Prodigy
2 years ago
Solved

Percentage Row Total not working for 100% Stacked Column Chart

Hi Team, I am working on a 100% Stacked Column Chart where I want to see the percentage of each quarter along with the Geography breakdown. In the Matrix table, I am getting exactly 100% (sum of A...
  • NaveenGandhi's avatar
    NaveenGandhi
    2 years ago

    harirao 


    That's a basic method to calculate percentage, this might change depending on you logic. If you have issues using this, please share a sample file or logic along with column names.


    Perct=

    Var overall = CALCULATE(sum(sales),all('Table'))

    return DIVIDE(sum(sales),overall,0)

    Don't forget to change the data type to percentage for this measure.

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi harirao ,
    Thanks for  NaveenGandhi reply.

    You can try measure below

    Measure = 
    VAR a = SUM('Table'[Value])
    VAR b = 
    CALCULATE(
        SUM('Table'[Value]),
        ALLEXCEPT(
            'Table',
            'Table'[Qtr]
        )
    )
    RETURN
    a/b

    Final output

     

    Best regards,
    Albert He


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly