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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DSwezey
Helper III
Helper III

Getting Current, 30, 60, 90 Day AR Aging

I have an Accounts Receivable table called "AR" that has a Date column and a Transaction Amount column. 

I have your standard "Date" table. The two tables are related via the Date Columns.

I want to create a measure(s) to calculate the Current (Today), 30 (1-30), 60 (31-60) and 90+(61+) days aging amounts.

 

My current code just to get 30 days is as follows: 

30Days = 
Calculate(
    'Sum('AR'[Transaction Amount]),
    DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-30,Day)
)

I am getting an amount, but nothing even close to the true amount.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DSwezey ,

 

It works fine on my pbix I tested.

Sample data

Table AR:

vstephenmsft_0-1637735514517.png

Relationship:

vstephenmsft_1-1637735534307.png

 

The slicer is created by the date field from Date table.

vstephenmsft_2-1637735558152.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @DSwezey ,

 

It works fine on my pbix I tested.

Sample data

Table AR:

vstephenmsft_0-1637735514517.png

Relationship:

vstephenmsft_1-1637735534307.png

 

The slicer is created by the date field from Date table.

vstephenmsft_2-1637735558152.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

 

 

wdx223_Daniel
Super User
Super User

30Days = 
Calculate(
    'Sum('AR'[Transaction Amount]),
    DATESINPERIOD('Date'[Date],Today()-1,-30,Day)
)

The issue I have with this is the "Today()-1" bit. 

I am not looking to base this off of Todays date. I want to base it off my selected date on the slider. Lets say I have 1/1/2021 - 11/15/2021 selected I want to see the Current, 30, 60, 90+ based on the 11/15/2021 date

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors