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 calculate how many default days are clients?

Hi,

 

I have a Sales Table that shows the sale pay date and the date that the client in fact payed for the product, called "Sales Off". 

 

If today is greater than the pay date and the Sales Off cell is empty, it means that the client has default.

 

How can I build a measure that shows how many default days each client is?

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Anonymous Perhaps something like:

Days in Default Measure = 
  VAR __Today = TODAY()
  VAR __PayDate = MAX('Table'[Sales Pay Date])
  VAR __SalesOff = MAX('Table'[Sales Off])
RETURN
  IF(__Today > __PayDate && ISBLANK(__SalesOff),(__Today - __PayDate)*1.,BLANK)
  


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

This will return me just a single value, but I need a value for each client. I have build a measure to sum the amount defaulted, maybe this can help to understand what I mean:

 

CALCULATE(
sum('Sales Table'[Amunt]),
FILTER(
'Sales Table',
'Sales Table'[sales Off] = BLANK() &&
'Sales Table'[pay date] < TODAY()
)
)

@Anonymous Well, I assumed that you would put the measure into something like a table visualization along with the client or whatever you needed it by. So, create a table visual and put the client field in the Values field well. Then place the measure into the field well.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I will do this too, but I also need to do the geometric avarege of days default

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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