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

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

Reply
Anonymous
Not applicable

Historical late payment with DAX

Hello, I have a table that contains the due date of a bill and the date of payment.

 

I need to count each day the number of bills late on the day (even it's paid nowdays). Any idea?

 

Eg: in 2022/07/11 ID 29040 was late (because the due date is 2022/07/10 and the payment occured on 2022/07/12)

gbernardes__0-1674871881373.png

 

 

 

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

Hi @Anonymous ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1675055728889.png

Please try:

Measure = SUMX('Table',IF([Payment Date]>=[Due Date],1,0))

Final output:

vjianbolimsft_1-1675056078605.png

Best Regards,

Jianbo Li

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
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1675055728889.png

Please try:

Measure = SUMX('Table',IF([Payment Date]>=[Due Date],1,0))

Final output:

vjianbolimsft_1-1675056078605.png

Best Regards,

Jianbo Li

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

@Anonymous , For any selected date ( prefer independent date table)

Late payments are

 

countrows(filter(Table, [Payment Date] > [Due date] && [Due Date] <= Max(Date[Date]) ) )

 

before today

 

countrows(filter(Table, [Payment Date] > [Due date] && [Due Date] <= today() ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello @amitchandak 

 

Not working 😞

gbernardes__0-1674873247480.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.