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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to build a measure to calculate days late?

Hi,

 

I have a sales table that contains these main infos:

 

Pay Date - The day that the client should pay

Sales Off - The day that the client in fact payed.

 

 

When a client has defaulted, the Sale Off cell is empty and today date is greater than the pay date. 

 

I'd like to build a measure that shows how many days late the default clients are. For instance: If a client has a pay date 01/06/2021 and today is 15/06/2021 and also the Sales Off cell is empty, so the client is 14 days late.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Create the following measure.

 

Days Late = 

Sumx ( Table2,
IF(
    TODAY() >(Table2[Pay Date]) &&(Table2[Sales Off]) = BLANK(),
    INT(TODAY() -(Table2[Pay Date]) )
)
)

 


 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@Anonymous 

Create the following measure.

 

Days Late = 

Sumx ( Table2,
IF(
    TODAY() >(Table2[Pay Date]) &&(Table2[Sales Off]) = BLANK(),
    INT(TODAY() -(Table2[Pay Date]) )
)
)

 


 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy ,

 

I got what you meant, however the problem is that I have many different sales in the "table 2" and I'd like to know the default per client

@Anonymous 

 

I modified the formula, insert customer Id or customer name in a table visual and add the measure and try 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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