Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Dellis81
Continued Contributor
Continued Contributor

AR Aging report by invoice with multiple pmts

Hello!

 

I am struggling creating an aging report x invoice that may have multiple pmts against a single invoice.  But, I'm not getting past simple math right now.   I am relatively new to this technology - appreciate your help!   I have reviewed multiple conversations in this forum, but not quite finding what I need.

 

I have created a shareable google drive link if anyone wants to review what I have in place (I have deleted many attempts to simplify :).   https://drive.google.com/open?id=1CoYLWkuG_M4pW8-8zCZnI3EclxQ4uly5

 

 Transactional data (simplifed) that is brought into PBI - with Entry Types of "R" - Receivables, and "D", deposits.   For each Deposit - the description field matches to the InvoiceID of the Receivable entry.   In hte example below, VendorA - the deposit on 1/19/19 is for invoice 2888 dated 12/26/18.

 

Vendor B, Invoice 67408 is an example of multiple pmts, with a balance remaining.

DateAccountVendorAmountDescriptionInvoice IDEntryType
12/26/20181055VendorA5400Deposit: 112888R
1/19/20191055VendorA-5400288811D
10/17/20171055VendorB6197.31Deposit: 40206R
10/23/20171055VendorB-6197.3120640D
3/27/20171055VendorB8840.93Deposit: 3267408R
3/27/20171055VendorB-60006740811D
6/1/20171055VendorB-20006740832D
11/26/20191055VendorB5168 3681R

 

The below measure - my first attempt at least gets the amount paid for all invoices x customer - which obviously is wrong - for multiple reasons.

 

 

AcctsRecPaid = calculate([Amount1],Data[EntryType]<>"R",all(Data[Invoice ID]))

 

 

Then I tried to implement the keepfilters (or variants of the filter) - to match the InvoiceID with deposit description and that blanks everything out.

 

 

AcctsRecPaidKF = calculate([Amount1],Data[EntryType]<>"R",all(Data[Invoice ID]),filter(Data,Data[Invoice ID]=max(Data[Description])))

 

 

 

The desired report I want to get to is mocked up in excel (see below)

 

      Today12/30/2019      
              
              
DateAccountVendorInvoice IDAmountPmtNetDueOpenDaysWtAvg
OpenDays
Number of
Pmts
0-3030-6060-90>90
12/26/20181055VendorA28885,400.00(5,400.00)0.00242415,400.00   
              
10/17/20171055VendorB2066,197.31(6,197.31)0.006616,197.31   
3/27/20171055VendorB674088,840.93(8,000.00)840.931,008??26,000.00 2,000.00840.93
11/26/20191055VendorB36815,168.000.005,168.0034340 5,168.00  

 

Again, thank you - both excel and pbix file should be on the shareable link provided above.

thanks

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Dellis81 ,

 

>>The desired report I want to get to is mocked up in excel (see below).

 

From your desired report, could you please show us which columns or measures would you like to get and what's the logic to get them?

 

Best Regards,

Amy

 

Community Support Team _ Amy

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

Dellis81
Continued Contributor
Continued Contributor

Thanks for your response Amy!

 

First, I am struggling just getting started with this report - in getting the deposits matched with each individual AR invoice.  

My first attempt at AcctsRecPaid column is this measure

AcctsRecPaid = calculate([Amount1],Data[EntryType]<>"R",ALLEXCEPT(Data,Data[Vendor]),Data[Invoice ID])

Which at least got the proper total amount paid by vendor - but not by Invoice ID.

AmountPaid.PNG

The below measure is my initial (& feeble) attempt at trying to get the amount paid for each invoice.

AcctsRecPaidKF = 

VAR Match0 = CALCULATETABLE(Data,all(Data),Data[Description]="206",Data[Invoice ID]="206")

VAR CalcMatch = calculate([AcctsRecPaid],Match0)
//VAR CalcMatch = calculate([AcctsRecPaid])
Return
//if(MAX(Data[EntryType])="R",CalcMatch,blank())
CalcMatch

The logic behing this measure - is to match every entry type NOT R with corresponding AR invoice.   The matching criteria is InvoiceID (type R) matches the "Description" within all deposits (type D).

DataExampleInvoice67408.PNG

So, for invoice 67408 there were two deposits (circled in blue) - and the total of those two deposits would be the value shown in "Amount Paid.

 

 

 

 

 

 

As for the remaining columns - I have not thought thru the logic much yet.     I have seen numerous examples of "aging buckets" on this forum, but havent dug into to much - not until I get this initial logic in place by invoice.

 

thanks for your thoughts and time!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.