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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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