Forum Discussion

sdhn's avatar
sdhn
Responsive Resident
4 years ago
Solved

New%=SUM(Col1+Col2) /Col3

Hello All,

 

 

I am using Power Bi to develop report.

I have three columns.  I need to add two columns and divide by other colum.

Here is a fomula in SS.

 

New%=SUM(Col1+Col2) /Col3

 

help will be appreciated.

 

Thanks 

 

  • sdhn , If you could share some sample data with expected output then it would help us to give more specific answer but  you can try to create a column with below code:-

     

    New% = DIVIDE((column1+column2),column3)

     

5 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi sdhn ,

     

    If you are creating a measure then you can use below code:-

    New%= SUM(Col1)+Sum(Col2) / Sum(Col3)

     

    Thanks,

    Samarth

     

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Not 100% clear what you want. Is it a new column and by SUM do you want to add all values in the columns before dividing by the current value in column 3?

     

    Can you send a simple example table?

    • sdhn's avatar
      sdhn
      Responsive Resident

      Creating new column % based on:

       

      Adding columns 1 & 2. 

      Result divide by Column 3.

       

       

       

      Thanks 

      • Samarth_18's avatar
        Samarth_18
        Community Champion

        sdhn , If you could share some sample data with expected output then it would help us to give more specific answer but  you can try to create a column with below code:-

         

        New% = DIVIDE((column1+column2),column3)

         

  • themistoklis's avatar
    themistoklis
    Community Champion

    sdhn 

     

    You can also try this measure:

     

    Measure = CALCULATE((SUM(TableName[Col1] + TableName[Col2])) / SUM(TableName[Col3]))