Forum Discussion

Kolumam's avatar
Kolumam
Icon for Post Prodigy rankPost Prodigy
8 years ago

Issue with Calculating percentage

Hi All,

 

Please see the below image.

 

I was trying to create a calculate column of [SUM( Y)/SUM(X) ]* 100 and create a pie chart but it's not working as expected. It doens't have the summarise option. Please help

 

9 Replies

  • Hi Kolumam

     

    You are only calculating the percentage of Y on X. 

     

    Maybe you should try : 

     

    DIVIDE(Calculate(SUM(Table[Y]);All(Table));Calculate(SUM(Table[X]);All(Table))

    And then choose to display it as percentage 

     

    - Quentin

    • Kolumam's avatar
      Kolumam
      Icon for Post Prodigy rankPost Prodigy

      I did but doesn't split up.. shows the same for all

      • FlaF's avatar
        FlaF
        Icon for Helper I rankHelper I

        Did you calculate new columns with a formula like divide(sum(table.Y);sum(table.X))? or like divide(table.Y;table.X)?

  • You need to create a new column with this formula: DIVIDE(table.Y;table.X)

     

    Then, you have to change the format in percentage: menu bar -> modeling -> format

     

    Ciao

    Flavia