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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
djohanlon
Regular Visitor

Displaying total outstanding debt per day based on start and end date

I have some data which contains the following (example):

Issue Date, Amount, Maturity Date

01.01.2024, 10,000, 20.10.2024

05.01.2024, 12,000, 15.10.2024

08.01.2024, 8,000, 24.10.2024

etc.

 

so on the 06.02.2024, it would show that there was 22,00 outstanding. on the10.01.2024, it would show that there was 30,000 outsanding. On the 16.01.2024, this will now only show 18,000. and so forth.

 

What I want to do is create a table or graph which will show me, on any given date, how much is outstanding.

 

For any given date, Outstanding is how much, and the amount, were issued on or before that date (preferably midnight to midnight) and the maturity is on or after that date(preferably midnight to midnight).

 

 

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Hi @djohanlon ,

 

You need to create a table of dates without a relationship and then try the following formula:

Calendar = 
SELECTCOLUMNS (
    CALENDAR(DATE(2024, 1, 1), DATE(2024, 10, 20)),
    "DateKey", [Date],
    "Year", YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month Name", FORMAT ( [Date], "MMMM" ),
    "Day", DAY ( [Date] ),
    "Day of Week", WEEKDAY ( [Date] )
)

vkongfanfmsft_0-1715828984365.png

Outstanding Debt = 
CALCULATE (
    SUM ( 'Debt'[Amount] ),
    FILTER (
        'Debt',
        'Debt'[Issue Date] <= MAX ( 'Calendar'[Date] )
            && 'Debt'[Maturity Date] >= MAX ( 'Calendar'[Date] )
    )
)

vkongfanfmsft_1-1715829028829.png

Best Regards,
Adamk Kong

 

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

2 REPLIES 2
v-kongfanf-msft
Community Support
Community Support

Thanks for the reply from @amitchandak , please allow me to provide another insight:

 

Hi @djohanlon ,

 

You need to create a table of dates without a relationship and then try the following formula:

Calendar = 
SELECTCOLUMNS (
    CALENDAR(DATE(2024, 1, 1), DATE(2024, 10, 20)),
    "DateKey", [Date],
    "Year", YEAR ( [Date] ),
    "Month Number", MONTH ( [Date] ),
    "Month Name", FORMAT ( [Date], "MMMM" ),
    "Day", DAY ( [Date] ),
    "Day of Week", WEEKDAY ( [Date] )
)

vkongfanfmsft_0-1715828984365.png

Outstanding Debt = 
CALCULATE (
    SUM ( 'Debt'[Amount] ),
    FILTER (
        'Debt',
        'Debt'[Issue Date] <= MAX ( 'Calendar'[Date] )
            && 'Debt'[Maturity Date] >= MAX ( 'Calendar'[Date] )
    )
)

vkongfanfmsft_1-1715829028829.png

Best Regards,
Adamk Kong

 

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

 

amitchandak
Super User
Super User

@djohanlon , I think same approach as Active/current employee should help

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.