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
Sean-OReilly
Helper IV
Helper IV

Aged Debt Date Wont populate in a Report

Hi

I have used a measure to calculate Aged Debt - please see the measure calculation below:

 

2 Sales Aged Date =
if([2 - Sales Invoice Date]<[1 - Today],
DATEDIFF([1 - Today],[2 - Sales Invoice Date], DAY),
blank())
 

When i insert this measure into a Table Visual the result will not display - a wheel keeps spinning in the top left of the visual... what am i doing wrong?

 

I want to create a measure that subtracts sales invoice date from todays date.

 

Thanks in advance for your help

 

 

 

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Sean-OReilly ,

 

See if this helps.

 

https://community.powerbi.com/t5/Desktop/Debt-Aging/m-p/1067551

https://community.powerbi.com/t5/Desktop/Dynamic-Accounts-Receivable-Aging/m-p/304192

 

 

Else try this as a measure

 

invoicedatedif =
IF (
    MAX ( working[InvoiceDate] )
        < TODAY (),
    DATEDIFF (
        TODAY (),
        MAX ( working[InvoiceDate] ),
        DAY
    ),
    BLANK ()
)

 

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @Sean-OReilly ,

 

See if this helps.

 

https://community.powerbi.com/t5/Desktop/Debt-Aging/m-p/1067551

https://community.powerbi.com/t5/Desktop/Dynamic-Accounts-Receivable-Aging/m-p/304192

 

 

Else try this as a measure

 

invoicedatedif =
IF (
    MAX ( working[InvoiceDate] )
        < TODAY (),
    DATEDIFF (
        TODAY (),
        MAX ( working[InvoiceDate] ),
        DAY
    ),
    BLANK ()
)

 

Thanks a million Harshnathani 

nvprasad
Solution Sage
Solution Sage

Hi,

 

Please try the below function.

invoicedatedif =
IF (
CALCULATE ( MAX ( working[InvoiceDate] ) ) < TODAY (),
DATEDIFF ( TODAY (), CALCULATE ( MAX ( working[InvoiceDate] ) ), DAY ),
BLANK ()
)

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

thanks for your response.

Unfortunately i am getting an error - see screenshot below... cant see where im going wrong?

 

Sean-OReilly_0-1595537833250.png

 

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.