Forum Discussion

kd3975_odi's avatar
kd3975_odi
New Member
9 years ago
Solved

Subtotal Table on multiple columns based on 1 primary column

Hi,

 

I am new to Power BI and I am trying to subtotal a number of columns based on 1 primary column.

 

The table structure is as follows with the primary column being the ContractID and the subtotals need to be added to the

ContractValue

EstInvoiceValue
ActInvoiceValue
DonInvOpenValue

columns.

 

This is my data table:

 

Dept ContractID PorjectNo ProgOfficer PName PStartDatePEndDatePStatus AccountCode CompanyName AccountName ContractNo ContractValue InvoiceStatus ProjectCurrency DonorInvCurrency EstimatedInvoiceDateEstInvoiceValue EstInvoiceDesc DonorInvoiceNo ActualInvoiceDateActInvoiceValue InvoiceBalance DonInvOpenValue DonorInvoiceStatus
00019300Project1Joe BloggsSample Project 130/05/201605/06/2017ProjectinprogressC0001Donor ABCDonor ABC LondonABC0001                       1,000BALANCE TO BE INVOICED                                 3GBP30/05/2016                               750UpfrontA1000030/05/2016                               750                               -                                   750O
00019300Project1Joe BloggsSample Project 130/05/201605/06/2017ProjectinprogressC0001Donor ABCDonor ABC LondonABC0001                       1,000BALANCE TO BE INVOICED                                 3GBP05/06/2017                               250On Completion                                   -                               250  
00029301Project2Joe BloggsSample Project 201/01/201630/04/2016ProjectinprogressC0002Donor XYZDonor XYZ New YorkXYZ0001                       5,000BALANCE TO BE INVOICED                                 3GBP30/04/2016                           3,500Fees                                   -                           3,500  
00029301Project2Joe BloggsSample Project 201/01/201630/04/2016ProjectinprogressC0002Donor XYZDonor XYZ New YorkXYZ0001                       5,000BALANCE TO BE INVOICED                                 3GBP30/04/2016                           1,500Reimbursables                                   -                           1,500  

 

I have searched the internet and could not find a solution so hoping this method will provide me the information I need.

 

Thanks

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi kd3975_odi,

     

    You can directly drag these columns to matrix to show the summary result or use SUMMARIZE function to get the summary table.

     

     

    Table formula:

    Table = SUMMARIZE(Sheet10,Sheet10[ContractID ],"Total ActInvoiceValue",SUM(Sheet10[ActInvoiceValue ]),"Total EstInvoiceValue",SUM(Sheet10[EstInvoiceValue ]),"Total InvoiceBalance",SUM(Sheet10[InvoiceBalance ]))

     

     

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi kd3975_odi,

     

    You can directly drag these columns to matrix to show the summary result or use SUMMARIZE function to get the summary table.

     

     

    Table formula:

    Table = SUMMARIZE(Sheet10,Sheet10[ContractID ],"Total ActInvoiceValue",SUM(Sheet10[ActInvoiceValue ]),"Total EstInvoiceValue",SUM(Sheet10[EstInvoiceValue ]),"Total InvoiceBalance",SUM(Sheet10[InvoiceBalance ]))

     

     

    Regards,

    Xiaoxin Sheng