extrobe
1/31/2017 - 2:00 PM

Aggregated Tables

Aggregated Tables

AggregatedLedger =
SUMMARIZE (
    CALCULATETABLE ( 'LEDGER', LEDGER[InvoiceDate] < DATE ( 2017, 1, 1 ) ),
    'LEDGER'[Customer Account],
    "TotalInvoiceValue", SUM ( 'LEDGER'[InvoiceValue£] )
)
AggregatedPayments =
SUMMARIZE (
    CALCULATETABLE ( 'Payments', Payments[TransactionReference] <> "" ),
    'Payments'[TransactionReference],
    "TotalPaidToInvoice", SUM ( 'Payments'[AllocationAmount] )
)
AggregatedPayments =
SUMMARIZE (
    Payments,
    'Payments'[TransactionReference],
    "TotalPaidToInvoice", SUM ( 'Payments'[AllocationAmount] )
)