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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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